Skip to content

Commit c6b704a

Browse files
authored
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
1 parent bceff0b commit c6b704a

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

compute/apiv1/smoke_test.go

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import (
2727

2828
"google.golang.org/api/option"
2929

30-
"github.com/google/go-cmp/cmp"
31-
3230
"cloud.google.com/go/internal/testutil"
3331
"cloud.google.com/go/internal/uid"
3432
"google.golang.org/api/iterator"
@@ -434,79 +432,6 @@ func TestPaginationMapResponseMaxRes(t *testing.T) {
434432
}
435433
}
436434

437-
func TestCapitalLetter(t *testing.T) {
438-
if testing.Short() {
439-
t.Skip("skipping smoke test in short mode")
440-
}
441-
ctx := context.Background()
442-
c, err := NewFirewallsRESTClient(ctx)
443-
if err != nil {
444-
t.Fatal(err)
445-
}
446-
space := uid.NewSpace("gogapic", nil)
447-
name := space.New()
448-
allowed := []*computepb.Allowed{
449-
{
450-
IPProtocol: proto.String("tcp"),
451-
Ports: []string{
452-
"80",
453-
},
454-
},
455-
}
456-
res := &computepb.Firewall{
457-
SourceRanges: []string{
458-
"0.0.0.0/0",
459-
},
460-
Name: proto.String(name),
461-
Allowed: allowed,
462-
}
463-
req := &computepb.InsertFirewallRequest{
464-
Project: projectId,
465-
FirewallResource: res,
466-
}
467-
insert, err := c.Insert(ctx, req)
468-
if err != nil {
469-
t.Fatal(err)
470-
}
471-
err = insert.Wait(ctx)
472-
if err != nil {
473-
t.Fatal(err)
474-
}
475-
defer func() {
476-
var op *Operation
477-
var err error
478-
ok := testutil.Retry(t, 20, 10*time.Second, func(r *testutil.R) {
479-
var err error
480-
op, err = c.Delete(ctx,
481-
&computepb.DeleteFirewallRequest{
482-
Project: projectId,
483-
Firewall: name,
484-
})
485-
if err != nil {
486-
r.Errorf("%v", err)
487-
}
488-
})
489-
if !ok {
490-
t.Fatal(err)
491-
}
492-
timeoutCtx, cancel := context.WithTimeout(ctx, 10*time.Minute)
493-
defer cancel()
494-
if err = op.Wait(timeoutCtx); err != nil {
495-
t.Error(err)
496-
}
497-
}()
498-
fetched, err := c.Get(ctx, &computepb.GetFirewallRequest{
499-
Project: projectId,
500-
Firewall: name,
501-
})
502-
if err != nil {
503-
t.Fatal(err)
504-
}
505-
if diff := cmp.Diff(fetched.GetAllowed(), allowed, cmp.Comparer(proto.Equal)); diff != "" {
506-
t.Fatalf("got(-),want(+):\n%s", diff)
507-
}
508-
}
509-
510435
func TestHeaders(t *testing.T) {
511436
ctx := context.Background()
512437

0 commit comments

Comments
 (0)