From c6b704a53fa05fcdbb3477def0bd59209fc1f35b Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Mon, 24 Oct 2022 10:18:14 -0500 Subject: [PATCH] test(compute): remove TestCapitalLetter (#6908) This test has been flaky for a long time. If we want something like this test in the future I think it needs to be re-structured to be successful. For now we will remove it as it is not providing value as is and since writing there are now many tests in our samples that should cover these types of use-cases. Fixes: #5988 --- compute/apiv1/smoke_test.go | 75 ------------------------------------- 1 file changed, 75 deletions(-) diff --git a/compute/apiv1/smoke_test.go b/compute/apiv1/smoke_test.go index 15f81065f00e..422cb85e1f08 100644 --- a/compute/apiv1/smoke_test.go +++ b/compute/apiv1/smoke_test.go @@ -27,8 +27,6 @@ import ( "google.golang.org/api/option" - "github.com/google/go-cmp/cmp" - "cloud.google.com/go/internal/testutil" "cloud.google.com/go/internal/uid" "google.golang.org/api/iterator" @@ -434,79 +432,6 @@ func TestPaginationMapResponseMaxRes(t *testing.T) { } } -func TestCapitalLetter(t *testing.T) { - if testing.Short() { - t.Skip("skipping smoke test in short mode") - } - ctx := context.Background() - c, err := NewFirewallsRESTClient(ctx) - if err != nil { - t.Fatal(err) - } - space := uid.NewSpace("gogapic", nil) - name := space.New() - allowed := []*computepb.Allowed{ - { - IPProtocol: proto.String("tcp"), - Ports: []string{ - "80", - }, - }, - } - res := &computepb.Firewall{ - SourceRanges: []string{ - "0.0.0.0/0", - }, - Name: proto.String(name), - Allowed: allowed, - } - req := &computepb.InsertFirewallRequest{ - Project: projectId, - FirewallResource: res, - } - insert, err := c.Insert(ctx, req) - if err != nil { - t.Fatal(err) - } - err = insert.Wait(ctx) - if err != nil { - t.Fatal(err) - } - defer func() { - var op *Operation - var err error - ok := testutil.Retry(t, 20, 10*time.Second, func(r *testutil.R) { - var err error - op, err = c.Delete(ctx, - &computepb.DeleteFirewallRequest{ - Project: projectId, - Firewall: name, - }) - if err != nil { - r.Errorf("%v", err) - } - }) - if !ok { - t.Fatal(err) - } - timeoutCtx, cancel := context.WithTimeout(ctx, 10*time.Minute) - defer cancel() - if err = op.Wait(timeoutCtx); err != nil { - t.Error(err) - } - }() - fetched, err := c.Get(ctx, &computepb.GetFirewallRequest{ - Project: projectId, - Firewall: name, - }) - if err != nil { - t.Fatal(err) - } - if diff := cmp.Diff(fetched.GetAllowed(), allowed, cmp.Comparer(proto.Equal)); diff != "" { - t.Fatalf("got(-),want(+):\n%s", diff) - } -} - func TestHeaders(t *testing.T) { ctx := context.Background()