Merge pull request #1509 from bergwolf/kata-check

cli: fix kata-check test
This commit is contained in:
Fupan Li 2019-04-11 20:13:24 +08:00 committed by GitHub
commit da08b3afc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,7 +215,7 @@ func TestCheckCheckKernelModulesNoNesting(t *testing.T) {
assert.NoError(err)
assert.Equal(count, uint32(0))
re := regexp.MustCompile(`\bwarning\b.*\bnested\b`)
re := regexp.MustCompile(`.*\bnested\b`)
matches := re.FindAllStringSubmatch(buf.String(), -1)
assert.NotEmpty(matches)
}
@ -309,7 +309,7 @@ func TestCheckCheckKernelModulesNoUnrestrictedGuest(t *testing.T) {
assert.NoError(err)
assert.Equal(count, uint32(0))
re := regexp.MustCompile(`\bwarning\b.*\bunrestricted_guest\b`)
re := regexp.MustCompile(`.*\bunrestricted_guest\b`)
matches := re.FindAllStringSubmatch(buf.String(), -1)
assert.NotEmpty(matches)
}