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

Adding a kubemci e2e test to verify that single and multicluster ingresses can exist together #62137

Merged
merged 1 commit into from
Apr 5, 2018
Merged
Changes from all commits
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
32 changes: 32 additions & 0 deletions test/e2e/network/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,38 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
}
verifyKubemciStatusHas(name, "is spread across 0 cluster")
})

It("single and multi-cluster ingresses should be able to exist together", func() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Is it also worth trying things in the other order:
Create, Create, Delete Multi, Delete Single
?

By("Creating a single cluster ingress first")
jig.Class = ""
singleIngFilePath := filepath.Join(framework.IngressManifestPath, "static-ip-2")
jig.CreateIngress(singleIngFilePath, ns, map[string]string{}, map[string]string{})
jig.WaitForIngress(false /*waitForNodePort*/)
// jig.Ingress will be overwritten when we create MCI, so keep a reference.
singleIng := jig.Ingress

// Create the multi-cluster ingress next.
By("Creating a multi-cluster ingress next")
jig.Class = framework.MulticlusterIngressClassValue
ingAnnotations := map[string]string{
framework.IngressStaticIPKey: ipName,
}
multiIngFilePath := filepath.Join(framework.IngressManifestPath, "http")
jig.CreateIngress(multiIngFilePath, ns, ingAnnotations, map[string]string{})
jig.WaitForIngress(false /*waitForNodePort*/)
mciIngress := jig.Ingress

By("Deleting the single cluster ingress and verifying that multi-cluster ingress continues to work")
jig.Ingress = singleIng
jig.Class = ""
jig.TryDeleteIngress()
jig.Ingress = mciIngress
jig.Class = framework.MulticlusterIngressClassValue
jig.WaitForIngress(false /*waitForNodePort*/)

By("Cleanup: Deleting the multi-cluster ingress")
jig.TryDeleteIngress()
})
})

// Time: borderline 5m, slow by design
Expand Down