Skip to content

Commit

Permalink
Merge pull request #3494 from aledbf/remove-503
Browse files Browse the repository at this point in the history
Since dynamic mode only checking for 'return 503' is not valid anymore
  • Loading branch information
k8s-ci-robot authored Nov 30, 2018
2 parents eaa91b0 + 334c382 commit 50b552d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 32 deletions.
6 changes: 2 additions & 4 deletions test/e2e/annotations/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Alias", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name foo")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name foo"))
})

resp, body, errs := gorequest.New().
Expand Down Expand Up @@ -80,8 +79,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Alias", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name foo")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name foo"))
})

hosts := []string{"foo", "bar"}
Expand Down
22 changes: 8 additions & 14 deletions test/e2e/annotations/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name auth")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name auth"))
})

resp, body, errs := gorequest.New().
Expand All @@ -81,8 +80,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name auth")) &&
Expect(server).Should(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name auth"))
})

resp, body, errs := gorequest.New().
Expand Down Expand Up @@ -112,8 +110,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name auth")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name auth"))
})

resp, body, errs := gorequest.New().
Expand Down Expand Up @@ -143,8 +140,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name auth")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name auth"))
})

resp, body, errs := gorequest.New().
Expand Down Expand Up @@ -175,8 +171,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name auth")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name auth"))
})

resp, _, errs := gorequest.New().
Expand Down Expand Up @@ -218,8 +213,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name auth")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name auth"))
})

resp, _, errs := gorequest.New().
Expand Down Expand Up @@ -275,7 +269,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {
f.NewHttpbinDeployment()

var httpbinIP string
err := wait.PollImmediate(time.Second, time.Minute, func() (bool, error) {
err := wait.PollImmediate(framework.Poll, 5*time.Minute, func() (bool, error) {
e, err := f.KubeClientSet.CoreV1().Endpoints(f.IngressController.Namespace).Get("httpbin", metav1.GetOptions{})
if errors.IsNotFound(err) {
return false, nil
Expand All @@ -300,7 +294,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() {
f.EnsureIngress(ing)

f.WaitForNginxServer(host, func(server string) bool {
return Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name auth"))
})
})

Expand Down
12 changes: 4 additions & 8 deletions test/e2e/annotations/canary.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ var _ = framework.IngressNginxDescribe("Annotations - canary", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name foo")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name foo"))
})

canaryAnnotations := map[string]string{
Expand Down Expand Up @@ -90,8 +89,7 @@ var _ = framework.IngressNginxDescribe("Annotations - canary", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name foo")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name foo"))
})

canaryAnnotations := map[string]string{
Expand Down Expand Up @@ -129,8 +127,7 @@ var _ = framework.IngressNginxDescribe("Annotations - canary", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name foo")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name foo"))
})

canaryAnnotations := map[string]string{
Expand Down Expand Up @@ -168,8 +165,7 @@ var _ = framework.IngressNginxDescribe("Annotations - canary", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring("server_name foo")) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring("server_name foo"))
})

canaryAnnotations := map[string]string{
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/annotations/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ var _ = framework.IngressNginxDescribe("Annotations - grpc", func() {

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring(fmt.Sprintf("server_name %v", host))) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring(fmt.Sprintf("server_name %v", host)))
})

f.WaitForNginxServer(host,
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/annotations/influxdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ func createInfluxDBIngress(f *framework.Framework, host, service string, port in

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring(fmt.Sprintf("server_name %v", host))) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring(fmt.Sprintf("server_name %v", host)))
})
}

Expand Down
3 changes: 1 addition & 2 deletions test/e2e/annotations/luarestywaf.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ func createIngress(f *framework.Framework, host, service string, port int, annot

f.WaitForNginxServer(host,
func(server string) bool {
return Expect(server).Should(ContainSubstring(fmt.Sprintf("server_name %v", host))) &&
Expect(server).ShouldNot(ContainSubstring("return 503"))
return Expect(server).Should(ContainSubstring(fmt.Sprintf("server_name %v", host)))
})

time.Sleep(1 * time.Second)
Expand Down

0 comments on commit 50b552d

Please sign in to comment.