Skip to content

Commit

Permalink
do not assert on random behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvinEfendi committed May 16, 2018
1 parent 2eb0286 commit c7de5a5
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions test/e2e/lua/dynamic_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package lua

import (
"fmt"
"math/rand"
"net/http"
"regexp"
"strings"
Expand Down Expand Up @@ -253,22 +252,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
newUpstreamName := hostnamePattern.FindAllStringSubmatch(body, -1)[0][1]
Expect(newUpstreamName).Should(Equal(upstreamName))
}

notEqualFound := false
for i := 0; i < 5; i++ {
resp, body, errs = gorequest.New().
Get(fmt.Sprintf("%s?completely-different-path=%f", f.IngressController.HTTPURL, rand.Float64())).
Set("Host", "foo.com").
End()
Expect(len(errs)).Should(Equal(0))
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
anotherUpstreamName := hostnamePattern.FindAllStringSubmatch(body, -1)[0][1]
notEqualFound = anotherUpstreamName != upstreamName
if notEqualFound {
break
}
}
Expect(notEqualFound).Should(Equal(true))
})

Context("when session affinity annotation is present", func() {
Expand Down

0 comments on commit c7de5a5

Please sign in to comment.