From 564f2a9fe4d1b4d65ea00a8cc234e0c233414dae Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Sat, 26 May 2018 16:27:21 -0400 Subject: [PATCH] Add retries to auth test checks --- test/e2e/annotations/auth.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/e2e/annotations/auth.go b/test/e2e/annotations/auth.go index 0f2b34046..31cc1f504 100644 --- a/test/e2e/annotations/auth.go +++ b/test/e2e/annotations/auth.go @@ -20,6 +20,7 @@ import ( "fmt" "net/http" "os/exec" + "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -58,6 +59,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() { resp, body, errs := gorequest.New(). Get(f.IngressController.HTTPURL). + Retry(10, 1*time.Second, http.StatusNotFound). Set("Host", host). End() @@ -90,6 +92,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() { resp, body, errs := gorequest.New(). Get(f.IngressController.HTTPURL). + Retry(10, 1*time.Second, http.StatusNotFound). Set("Host", host). End() @@ -127,6 +130,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() { resp, body, errs := gorequest.New(). Get(f.IngressController.HTTPURL). + Retry(10, 1*time.Second, http.StatusNotFound). Set("Host", host). End() @@ -164,6 +168,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() { resp, body, errs := gorequest.New(). Get(f.IngressController.HTTPURL). + Retry(10, 1*time.Second, http.StatusNotFound). Set("Host", host). SetBasicAuth("user", "pass"). End() @@ -202,6 +207,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() { resp, _, errs := gorequest.New(). Get(f.IngressController.HTTPURL). + Retry(10, 1*time.Second, http.StatusNotFound). Set("Host", host). SetBasicAuth("foo", "bar"). End() @@ -251,6 +257,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Auth", func() { resp, _, errs := gorequest.New(). Get(f.IngressController.HTTPURL). + Retry(10, 1*time.Second, http.StatusNotFound). Set("Host", host). SetBasicAuth("foo", "bar"). End()