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

USHIFT-1773: Add router scoped tests #2483

Merged
merged 3 commits into from
Nov 7, 2023
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
1 change: 1 addition & 0 deletions origin/NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Current code synchronised with github.com/openshift/origin@90bcab071d

List of changes that should be carried to openshift/origin:
- https://github.com/openshift/microshift/pull/2497
- https://github.com/openshift/microshift/pull/2483
4 changes: 3 additions & 1 deletion origin/suite.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"[sig-cli] oc explain should contain spec+status for route.openshift.io [apigroup:route.openshift.io] [Suite:openshift/conformance/parallel]"
"[sig-cli] oc expose can ensure the expose command is functioning as expected [apigroup:route.openshift.io] [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router converges when multiple routers are writing conflicting status [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host for overridden domains with a custom value [apigroup:image.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should run even if it has no access to update status [apigroup:image.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host for overridden domains with a custom value [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host with a custom value [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should serve the correct routes when scoped to a single namespace and label set [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should serve the correct routes when running with the haproxy config manager [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router converges when multiple routers are writing conflicting status [Suite:openshift/conformance/parallel]"
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router converges when multiple routers are writing status [Suite:openshift/conformance/parallel]"
Expand Down
11 changes: 4 additions & 7 deletions origin/test/extended/router/scoped.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,13 @@ var _ = g.Describe("[sig-network][Feature:Router][apigroup:route.openshift.io]",

g.Describe("The HAProxy router", func() {
g.It("should serve the correct routes when scoped to a single namespace and label set", func() {

routerPod := createScopedRouterPod(routerImage, "test-scoped", defaultPemData, "true")
g.By("creating a router")
ns := oc.KubeFramework().Namespace.Name
_, err := oc.AdminKubeClient().CoreV1().Pods(ns).Create(context.Background(), routerPod, metav1.CreateOptions{})
o.Expect(err).NotTo(o.HaveOccurred())

execPod := exutil.CreateExecPodOrFail(oc.AdminKubeClient(), ns, "execpod")
execPod := exutil.CreateAgnhostPodOrFail(oc.AdminKubeClient(), ns, "execpod")
defer func() {
oc.AdminKubeClient().CoreV1().Pods(ns).Delete(context.Background(), execPod.Name, *metav1.NewDeleteOptions(1))
}()
Expand Down Expand Up @@ -110,14 +109,13 @@ var _ = g.Describe("[sig-network][Feature:Router][apigroup:route.openshift.io]",
})

g.It("should override the route host with a custom value", func() {

routerPod := createOverrideRouterPod(routerImage)
g.By("creating a router")
ns := oc.KubeFramework().Namespace.Name
_, err := oc.AdminKubeClient().CoreV1().Pods(ns).Create(context.Background(), routerPod, metav1.CreateOptions{})
o.Expect(err).NotTo(o.HaveOccurred())

execPod := exutil.CreateExecPodOrFail(oc.AdminKubeClient(), ns, "execpod")
execPod := exutil.CreateAgnhostPodOrFail(oc.AdminKubeClient(), ns, "execpod")
defer func() {
oc.AdminKubeClient().CoreV1().Pods(ns).Delete(context.Background(), execPod.Name, *metav1.NewDeleteOptions(1))
}()
Expand Down Expand Up @@ -173,15 +171,14 @@ var _ = g.Describe("[sig-network][Feature:Router][apigroup:route.openshift.io]",
o.Expect(condition.LastTransitionTime).NotTo(o.BeNil())
})

g.It("should override the route host for overridden domains with a custom value [apigroup:image.openshift.io]", func() {

g.It("should override the route host for overridden domains with a custom value", func() {
routerPod := createOverrideDomainRouterPod(routerImage)
g.By("creating a router")
ns := oc.KubeFramework().Namespace.Name
_, err := oc.AdminKubeClient().CoreV1().Pods(ns).Create(context.Background(), routerPod, metav1.CreateOptions{})
o.Expect(err).NotTo(o.HaveOccurred())

execPod := exutil.CreateExecPodOrFail(oc.AdminKubeClient(), ns, "execpod")
execPod := exutil.CreateAgnhostPodOrFail(oc.AdminKubeClient(), ns, "execpod")
defer func() {
oc.AdminKubeClient().CoreV1().Pods(ns).Delete(context.Background(), execPod.Name, *metav1.NewDeleteOptions(1))
}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ var Annotations = map[string]string{

"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router reports the expected host names in admitted routes' statuses": " [Suite:openshift/conformance/parallel]",

"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host for overridden domains with a custom value [apigroup:image.openshift.io]": " [Skipped:Disconnected] [Suite:openshift/conformance/parallel]",
"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host for overridden domains with a custom value": " [Skipped:Disconnected] [Suite:openshift/conformance/parallel]",

"[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host with a custom value": " [Skipped:Disconnected] [Suite:openshift/conformance/parallel]",

Expand Down