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

In e2e tests, always skip checking for deletion of default backend service #523

Merged
merged 1 commit into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmd/e2e-test/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ func TestBasic(t *testing.T) {
t.Errorf("got %d backend services, want %d;\n%s", len(gclb.BackendService), tc.numBackendServices, pretty.Sprint(gclb.BackendService))
}

if err := e2e.WaitForIngressDeletion(ctx, gclb, s, ing, nil); err != nil {
deleteOptions := &fuzz.GCLBDeleteOptions{
SkipDefaultBackend: true,
}
if err := e2e.WaitForIngressDeletion(ctx, gclb, s, ing, deleteOptions); err != nil {
t.Errorf("e2e.WaitForIngressDeletion(..., %q, nil) = %v, want nil", ing.Name, err)
}
})
Expand Down
6 changes: 5 additions & 1 deletion cmd/e2e-test/cdn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ func TestCDN(t *testing.T) {
if err := Framework.Clientset.Extensions().Ingresses(s.Namespace).Delete(ing.Name, &metav1.DeleteOptions{}); err != nil {
t.Errorf("Delete(%q) = %v, want nil", ing.Name, err)
}

deleteOptions := &fuzz.GCLBDeleteOptions{
SkipDefaultBackend: true,
}
t.Logf("Waiting for GCLB resources to be deleted (%s/%s)", s.Namespace, ing.Name)
if err := e2e.WaitForGCLBDeletion(ctx, Framework.Cloud, gclb, nil); err != nil {
if err := e2e.WaitForGCLBDeletion(ctx, Framework.Cloud, gclb, deleteOptions); err != nil {
t.Errorf("e2e.WaitForGCLBDeletion(...) = %v, want nil", err)
}
t.Logf("GCLB resources deleted (%s/%s)", s.Namespace, ing.Name)
Expand Down
6 changes: 5 additions & 1 deletion cmd/e2e-test/iap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ func TestIAP(t *testing.T) {
if err := Framework.Clientset.Extensions().Ingresses(s.Namespace).Delete(ing.Name, &metav1.DeleteOptions{}); err != nil {
t.Errorf("Delete(%q) = %v, want nil", ing.Name, err)
}

deleteOptions := &fuzz.GCLBDeleteOptions{
SkipDefaultBackend: true,
}
t.Logf("Waiting for GCLB resources to be deleted (%s/%s)", s.Namespace, ing.Name)
if err := e2e.WaitForGCLBDeletion(ctx, Framework.Cloud, gclb, nil); err != nil {
if err := e2e.WaitForGCLBDeletion(ctx, Framework.Cloud, gclb, deleteOptions); err != nil {
t.Errorf("e2e.WaitForGCLBDeletion(...) = %v, want nil", err)
}
t.Logf("GCLB resources deleted (%s/%s)", s.Namespace, ing.Name)
Expand Down
8 changes: 6 additions & 2 deletions cmd/e2e-test/security_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ const (
policyUpdateTimeout = 10 * time.Minute
)

var deleteOptions = &fuzz.GCLBDeleteOptions{
SkipDefaultBackend: true,
}

func buildPolicyAllowAll(name string) *computebeta.SecurityPolicy {
return &computebeta.SecurityPolicy{
Name: name,
Expand Down Expand Up @@ -131,7 +135,7 @@ func TestSecurityPolicyEnable(t *testing.T) {

t.Logf("Cleaning up test")

if err := e2e.WaitForIngressDeletion(ctx, gclb, s, testIng, nil); err != nil {
if err := e2e.WaitForIngressDeletion(ctx, gclb, s, testIng, deleteOptions); err != nil {
t.Errorf("e2e.WaitForIngressDeletion(..., %q, nil) = %v, want nil", testIng.Name, err)
}
})
Expand Down Expand Up @@ -236,7 +240,7 @@ func TestSecurityPolicyTransition(t *testing.T) {

t.Logf("Cleaning up test")

if err := e2e.WaitForIngressDeletion(ctx, gclb, s, ing, nil); err != nil {
if err := e2e.WaitForIngressDeletion(ctx, gclb, s, ing, deleteOptions); err != nil {
t.Errorf("e2e.WaitForIngressDeletion(..., %q, nil) = %v, want nil", ing.Name, err)
}
})
Expand Down