From 1ffb9cff30be1fb20a8c38083871f1d777991b0c Mon Sep 17 00:00:00 2001 From: Dominik Hanak Date: Thu, 8 Feb 2024 13:51:29 +0100 Subject: [PATCH] Another version of regex --- test/e2e/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/helpers.go b/test/e2e/helpers.go index e6e14f7e5..5f6422304 100644 --- a/test/e2e/helpers.go +++ b/test/e2e/helpers.go @@ -103,7 +103,7 @@ func getHealthStatusInContainer(podName string, containerName string, ns string) Expect(err).NotTo(HaveOccurred()) stringOutput := string(output) fmt.Printf("Output transformed to string: %v\n", stringOutput) - reg, _ := regexp.Compile("(\\{(.*)\\](.*)\\})") + reg, _ := regexp.Compile("\\{.*\\].*\\}") stringOutput = reg.FindString(stringOutput) fmt.Printf("Found string using regex: %v\n", stringOutput) err = json.Unmarshal([]byte(stringOutput), &h)