cli: fix kata-check test

We don't really require nested nor unrestricted_guest to run. And there
is no point validating host cpu properties in UT.

Fixes: #1508

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2019-04-09 02:04:44 -07:00
parent 4265509e9c
commit 9ac68310f7

View File

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