From 51c2706cf0c813c2e00d4cbf097ec944f9214129 Mon Sep 17 00:00:00 2001 From: lucapette Date: Wed, 10 Mar 2021 13:39:52 +0100 Subject: [PATCH] [#1174] Follow up of the follow up of the fix Because we deserve it --- infrastructure/cli/integration/version_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/cli/integration/version_test.go b/infrastructure/cli/integration/version_test.go index 6da38ad6a4..e9075a1f75 100644 --- a/infrastructure/cli/integration/version_test.go +++ b/infrastructure/cli/integration/version_test.go @@ -12,7 +12,7 @@ func TestVersion(t *testing.T) { } // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string - validVersionString := regexp.MustCompile(`^Version: (0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?, GitCommit: [0-9a-f]{5,40}\n$`) + validVersionString := regexp.MustCompile(`^Version: (develop|(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?), GitCommit: [0-9a-f]{5,40}\n$`) if !validVersionString.MatchString(actual) { t.Errorf("expected %s to be a valid version but was not", actual)