Skip to content

Commit 10626d6

Browse files
committed
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 <[email protected]>
1 parent 71223f5 commit 10626d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

machine_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ func testCreateMachine(ctx context.Context, t *testing.T, m *Machine) {
644644
}
645645

646646
func parseVersionFromStdout(stdout []byte) (string, error) {
647-
pattern := regexp.MustCompile(`Firecracker v(?P<version>[0-9]\.[0-9]\.[0-9]-?.*)`)
647+
pattern := regexp.MustCompile(`Firecracker v(?P<version>[0-9]+\.[0-9]+\.[0-9]+-?.*)`)
648648
groupNames := pattern.SubexpNames()
649649
matches := pattern.FindStringSubmatch(string(stdout))
650650

0 commit comments

Comments
 (0)