Skip to content

Commit

Permalink
Fix get firecracker version test
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Kern-- committed Sep 4, 2024
1 parent 71223f5 commit 10626d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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<version>[0-9]\.[0-9]\.[0-9]-?.*)`)
pattern := regexp.MustCompile(`Firecracker v(?P<version>[0-9]+\.[0-9]+\.[0-9]+-?.*)`)
groupNames := pattern.SubexpNames()
matches := pattern.FindStringSubmatch(string(stdout))

Expand Down

0 comments on commit 10626d6

Please sign in to comment.