Skip to content

Commit

Permalink
Allow both IPv4 IP and hostname for ACS api-url
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Rakers <[email protected]>
  • Loading branch information
hrak committed Oct 2, 2023
1 parent 76b5342 commit 2f4d635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/toxiproxy/toxiProxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func TearDownToxiProxyACS(ctx context.Context, clusterProxy framework.ClusterPro
}

func parseUrl(url string) (string, string, int, string) {
serverRegex := regexp.MustCompilePOSIX("(https?)://([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+):([0-9]+)?(.*)")
serverRegex := regexp.MustCompilePOSIX("(https?)://([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+|[a-zA-Z0-9. _-]+):([0-9]+)?(.*)")

urlComponents := serverRegex.FindStringSubmatch(url)
Expect(len(urlComponents)).To(BeNumerically(">=", 4))
Expand Down

0 comments on commit 2f4d635

Please sign in to comment.