chore: update httpbin to httpbun (#9919)
Signed-off-by: Spazzy <brendankamp757@gmail.com>
This commit is contained in:
parent
eec43519fa
commit
0bdb64373c
12 changed files with 215 additions and 117 deletions
|
|
@ -33,7 +33,7 @@ var _ = framework.IngressNginxDescribe("brotli", func() {
|
|||
host := "brotli"
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
f.NewHttpbinDeployment()
|
||||
f.NewHttpbunDeployment()
|
||||
})
|
||||
|
||||
ginkgo.It("should only compress responses that meet the `brotli-min-length` condition", func() {
|
||||
|
|
@ -43,7 +43,7 @@ var _ = framework.IngressNginxDescribe("brotli", func() {
|
|||
f.UpdateNginxConfigMapData("brotli-types", contentEncoding)
|
||||
f.UpdateNginxConfigMapData("brotli-min-length", strconv.Itoa(brotliMinLength))
|
||||
|
||||
f.EnsureIngress(framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, nil))
|
||||
f.EnsureIngress(framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBunService, 80, nil))
|
||||
|
||||
f.WaitForNginxConfiguration(
|
||||
func(server string) bool {
|
||||
|
|
|
|||
|
|
@ -50,17 +50,21 @@ var _ = framework.IngressNginxDescribe("[Flag] disable-service-external-name", f
|
|||
})
|
||||
|
||||
ginkgo.It("should ignore services of external-name type", func() {
|
||||
|
||||
nonexternalhost := "echo-svc.com"
|
||||
|
||||
externalhost := "echo-external-svc.com"
|
||||
|
||||
ip := f.NewHttpbunDeployment()
|
||||
svc := framework.BuildNIPExternalNameService(f, ip, "echo")
|
||||
f.EnsureService(svc)
|
||||
|
||||
svcexternal := &corev1.Service{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "external",
|
||||
Namespace: f.Namespace,
|
||||
},
|
||||
Spec: corev1.ServiceSpec{
|
||||
ExternalName: "httpbin.org",
|
||||
ExternalName: framework.BuildNIPHost(ip),
|
||||
Type: corev1.ServiceTypeExternalName,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,13 +50,13 @@ var _ = framework.DescribeSetting("[Security] global-auth-url", func() {
|
|||
|
||||
ginkgo.BeforeEach(func() {
|
||||
f.NewEchoDeployment()
|
||||
f.NewHttpbinDeployment()
|
||||
f.NewHttpbunDeployment()
|
||||
})
|
||||
|
||||
ginkgo.Context("when global external authentication is configured", func() {
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
globalExternalAuthURL := fmt.Sprintf("http://%s.%s.svc.cluster.local:80/status/401", framework.HTTPBinService, f.Namespace)
|
||||
globalExternalAuthURL := fmt.Sprintf("http://%s.%s.svc.cluster.local:80/status/401", framework.HTTPBunService, f.Namespace)
|
||||
|
||||
ginkgo.By("Adding an ingress rule for /foo")
|
||||
fooIng := framework.NewSingleIngress("foo-ingress", fooPath, host, f.Namespace, echoServiceName, 80, nil)
|
||||
|
|
@ -158,7 +158,7 @@ var _ = framework.DescribeSetting("[Security] global-auth-url", func() {
|
|||
globalExternalAuthCacheKey := "foo"
|
||||
globalExternalAuthCacheDurationSetting := "global-auth-cache-duration"
|
||||
globalExternalAuthCacheDuration := "200 201 401 30m"
|
||||
globalExternalAuthURL := fmt.Sprintf("http://%s.%s.svc.cluster.local:80/status/200", framework.HTTPBinService, f.Namespace)
|
||||
globalExternalAuthURL := fmt.Sprintf("http://%s.%s.svc.cluster.local:80/status/200", framework.HTTPBunService, f.Namespace)
|
||||
|
||||
ginkgo.By("Adding a global-auth-cache-key to configMap")
|
||||
f.SetNginxConfigMapData(map[string]string{
|
||||
|
|
@ -182,7 +182,7 @@ var _ = framework.DescribeSetting("[Security] global-auth-url", func() {
|
|||
Expect().
|
||||
Status(http.StatusOK)
|
||||
|
||||
err := f.DeleteDeployment(framework.HTTPBinService)
|
||||
err := f.DeleteDeployment(framework.HTTPBunService)
|
||||
assert.Nil(ginkgo.GinkgoT(), err)
|
||||
framework.Sleep()
|
||||
|
||||
|
|
@ -307,9 +307,9 @@ http {
|
|||
assert.GreaterOrEqual(ginkgo.GinkgoT(), len(e.Subsets), 1, "expected at least one endpoint")
|
||||
assert.GreaterOrEqual(ginkgo.GinkgoT(), len(e.Subsets[0].Addresses), 1, "expected at least one address ready in the endpoint")
|
||||
|
||||
httpbinIP := e.Subsets[0].Addresses[0].IP
|
||||
httpbunIP := e.Subsets[0].Addresses[0].IP
|
||||
|
||||
f.UpdateNginxConfigMapData(globalExternalAuthURLSetting, fmt.Sprintf("http://%s/cookies/set/alma/armud", httpbinIP))
|
||||
f.UpdateNginxConfigMapData(globalExternalAuthURLSetting, fmt.Sprintf("http://%s/cookies/set/alma/armud", httpbunIP))
|
||||
|
||||
ing1 = framework.NewSingleIngress(host, "/", host, f.Namespace, "http-cookie-with-error", 80, nil)
|
||||
f.EnsureIngress(ing1)
|
||||
|
|
|
|||
|
|
@ -98,21 +98,21 @@ var _ = framework.IngressNginxDescribe("[Flag] custom HTTP and HTTPS ports", fun
|
|||
ginkgo.Context("when external authentication is configured", func() {
|
||||
|
||||
ginkgo.It("should set the X-Forwarded-Port header to 443", func() {
|
||||
f.NewHttpbinDeployment()
|
||||
f.NewHttpbunDeployment()
|
||||
|
||||
err := framework.WaitForEndpoints(f.KubeClientSet, framework.DefaultTimeout, framework.HTTPBinService, f.Namespace, 1)
|
||||
err := framework.WaitForEndpoints(f.KubeClientSet, framework.DefaultTimeout, framework.HTTPBunService, f.Namespace, 1)
|
||||
assert.Nil(ginkgo.GinkgoT(), err)
|
||||
|
||||
e, err := f.KubeClientSet.CoreV1().Endpoints(f.Namespace).Get(context.TODO(), framework.HTTPBinService, metav1.GetOptions{})
|
||||
e, err := f.KubeClientSet.CoreV1().Endpoints(f.Namespace).Get(context.TODO(), framework.HTTPBunService, metav1.GetOptions{})
|
||||
assert.Nil(ginkgo.GinkgoT(), err)
|
||||
|
||||
assert.GreaterOrEqual(ginkgo.GinkgoT(), len(e.Subsets), 1, "expected at least one endpoint")
|
||||
assert.GreaterOrEqual(ginkgo.GinkgoT(), len(e.Subsets[0].Addresses), 1, "expected at least one address ready in the endpoint")
|
||||
|
||||
httpbinIP := e.Subsets[0].Addresses[0].IP
|
||||
httpbunIP := e.Subsets[0].Addresses[0].IP
|
||||
|
||||
annotations := map[string]string{
|
||||
"nginx.ingress.kubernetes.io/auth-url": fmt.Sprintf("http://%s/basic-auth/user/password", httpbinIP),
|
||||
"nginx.ingress.kubernetes.io/auth-url": fmt.Sprintf("http://%s/basic-auth/user/password", httpbunIP),
|
||||
"nginx.ingress.kubernetes.io/auth-signin": "http://$host/auth/start",
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue