From 10626d6b3f442d6b4460357ef38a110e8ca5fb4a Mon Sep 17 00:00:00 2001 From: Kern Walster Date: Wed, 4 Sep 2024 22:49:05 +0000 Subject: [PATCH] Fix get firecracker version test Firecracker mainline is now on v1.10.0-dev, but our version regex only allowed a single digit for each part of the version. This allows 1+ digits for each part. Signed-off-by: Kern Walster --- machine_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_test.go b/machine_test.go index 378225ff..6b330d30 100644 --- a/machine_test.go +++ b/machine_test.go @@ -644,7 +644,7 @@ func testCreateMachine(ctx context.Context, t *testing.T, m *Machine) { } func parseVersionFromStdout(stdout []byte) (string, error) { - pattern := regexp.MustCompile(`Firecracker v(?P[0-9]\.[0-9]\.[0-9]-?.*)`) + pattern := regexp.MustCompile(`Firecracker v(?P[0-9]+\.[0-9]+\.[0-9]+-?.*)`) groupNames := pattern.SubexpNames() matches := pattern.FindStringSubmatch(string(stdout))