Skip to content

Commit 15ad48c

Browse files
committed
fix url for routes
1 parent b59ef51 commit 15ad48c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/suite/graceful_recovery_test.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ var _ = Describe("Graceful Recovery test", Ordered, Label("functional", "gracefu
4242
},
4343
}
4444

45-
teaURI := "/tea"
46-
coffeeURI := "http://cafe.example.com/coffee"
45+
baseHttpURL := "http://cafe.example.com"
46+
baseHttpsURL := "https://cafe.example.com"
47+
teaURL := baseHttpsURL + "/tea"
48+
coffeeURL := baseHttpURL + "/coffee"
4749

48-
var ngfPodName, teaURL, coffeeURL string
50+
var ngfPodName string
4951

5052
BeforeAll(func() {
5153
// this test is unique in that it will check the entire log of both ngf and nginx containers
@@ -60,12 +62,12 @@ var _ = Describe("Graceful Recovery test", Ordered, Label("functional", "gracefu
6062
Expect(podNames).To(HaveLen(1))
6163

6264
ngfPodName = podNames[0]
63-
port := 80
6465
if portFwdPort != 0 {
65-
port = portFwdPort
66+
coffeeURL = fmt.Sprintf("%s:%d/coffee", baseHttpURL, portFwdPort)
67+
}
68+
if portFwdHTTPSPort != 0 {
69+
teaURL = fmt.Sprintf("%s:%d/tea", baseHttpsURL, portFwdHTTPSPort)
6670
}
67-
teaURL = fmt.Sprintf("http://cafe.example.com:%d", port) + teaURI
68-
coffeeURL = fmt.Sprintf("http://cafe.example.com:%d", port) + coffeeURI
6971
})
7072

7173
BeforeEach(func() {

0 commit comments

Comments
 (0)