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 case for mixed/uppercase host name #14858

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions test/extended/router/scoped.go
Expand Up @@ -79,12 +79,12 @@ var _ = g.Describe("[Conformance][networking][router] openshift routers", func()
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for the valid route to respond")
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, "first.example.com", changeTimeoutSeconds)
err = waitForRouterOKResponseExec(ns, execPodName, routerURL+"/Letter", "FIRST.example.com", changeTimeoutSeconds)
o.Expect(err).NotTo(o.HaveOccurred())

for _, host := range []string{"second.example.com", "third.example.com"} {
g.By(fmt.Sprintf("checking that %s does not match a route", host))
err = expectRouteStatusCodeExec(ns, execPodName, routerURL, host, http.StatusServiceUnavailable)
err = expectRouteStatusCodeExec(ns, execPodName, routerURL+"/Letter", host, http.StatusServiceUnavailable)
o.Expect(err).NotTo(o.HaveOccurred())
}
})
Expand Down Expand Up @@ -128,18 +128,18 @@ var _ = g.Describe("[Conformance][networking][router] openshift routers", func()
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for the valid route to respond")
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, fmt.Sprintf(pattern, "route-1", ns), changeTimeoutSeconds)
err = waitForRouterOKResponseExec(ns, execPodName, routerURL+"/Letter", fmt.Sprintf(pattern, "route-1", ns), changeTimeoutSeconds)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("checking that the stored domain name does not match a route")
host := "first.example.com"
err = expectRouteStatusCodeExec(ns, execPodName, routerURL, host, http.StatusServiceUnavailable)
err = expectRouteStatusCodeExec(ns, execPodName, routerURL+"/Letter", host, http.StatusServiceUnavailable)
o.Expect(err).NotTo(o.HaveOccurred())

for _, host := range []string{"route-1", "route-2"} {
host = fmt.Sprintf(pattern, host, ns)
g.By(fmt.Sprintf("checking that %s matches a route", host))
err = expectRouteStatusCodeExec(ns, execPodName, routerURL, host, http.StatusOK)
err = expectRouteStatusCodeExec(ns, execPodName, routerURL+"/Letter", host, http.StatusOK)
o.Expect(err).NotTo(o.HaveOccurred())
}
})
Expand Down
2 changes: 2 additions & 0 deletions test/extended/testdata/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions test/extended/testdata/scoped-router.yaml
Expand Up @@ -82,6 +82,7 @@ objects:
select: first
spec:
host: first.example.com
path: /Letter
to:
name: endpoints
ports:
Expand All @@ -95,6 +96,7 @@ objects:
select: second
spec:
host: second.example.com
path: /Letter
to:
name: endpoints
ports:
Expand Down