From 2f4d635fb80def7084445a403496264d9dc999d9 Mon Sep 17 00:00:00 2001 From: Hans Rakers Date: Thu, 28 Sep 2023 10:46:12 +0200 Subject: [PATCH] Allow both IPv4 IP and hostname for ACS api-url Signed-off-by: Hans Rakers --- test/e2e/toxiproxy/toxiProxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/toxiproxy/toxiProxy.go b/test/e2e/toxiproxy/toxiProxy.go index 32c1fb7b..0ddba574 100644 --- a/test/e2e/toxiproxy/toxiProxy.go +++ b/test/e2e/toxiproxy/toxiProxy.go @@ -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))