4
4
"context"
5
5
"encoding/csv"
6
6
"fmt"
7
+ "net"
7
8
"net/http"
8
9
"strconv"
9
10
"strings"
@@ -70,7 +71,7 @@ var _ = g.Describe("[sig-network][Feature:Router]", func() {
70
71
routerURL := fmt .Sprintf ("http://%s" , routerIP )
71
72
72
73
g .By ("waiting for the healthz endpoint to respond" )
73
- healthzURI := fmt .Sprintf ("http://%s:1936 /healthz" , routerIP )
74
+ healthzURI := fmt .Sprintf ("http://%s/healthz" , net . JoinHostPort ( routerIP , "1936" ) )
74
75
err = waitForRouterOKResponseExec (ns , execPod .Name , healthzURI , routerIP , changeTimeoutSeconds )
75
76
o .Expect (err ).NotTo (o .HaveOccurred ())
76
77
@@ -87,7 +88,7 @@ var _ = g.Describe("[sig-network][Feature:Router]", func() {
87
88
g .By (fmt .Sprintf ("checking that there are three weighted backends in the router stats" ))
88
89
var trafficValues []string
89
90
err = wait .PollImmediate (100 * time .Millisecond , changeTimeoutSeconds * time .Second , func () (bool , error ) {
90
- statsURL := fmt .Sprintf ("http://%s:1936 /;csv" , routerIP )
91
+ statsURL := fmt .Sprintf ("http://%s/;csv" , net . JoinHostPort ( routerIP , "1936" ) )
91
92
stats , err := getAuthenticatedRouteURLViaPod (ns , execPod .Name , statsURL , host , "admin" , "password" )
92
93
o .Expect (err ).NotTo (o .HaveOccurred ())
93
94
trafficValues , err = parseStats (stats , "weightedroute" , 7 )
0 commit comments