Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(compute): remove TestCapitalLetter #6908

Merged
merged 3 commits into from Oct 24, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
73 changes: 0 additions & 73 deletions compute/apiv1/smoke_test.go
Expand Up @@ -434,79 +434,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()

Expand Down