diff --git a/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go b/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go index f2b1077786..9dfe73d572 100644 --- a/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go +++ b/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go @@ -271,6 +271,7 @@ func TestCheckHostIsVMContainerCapable(t *testing.T) { var cpuData []testCPUData var moduleData []testModuleData + cpuType = getCPUtype() if cpuType == cpuTypeIntel { cpuData = []testCPUData{ @@ -321,12 +322,6 @@ func TestCheckHostIsVMContainerCapable(t *testing.T) { err = hostIsVMContainerCapable(details) assert.Nil(err) - - // remove the modules to force a failure - err = os.RemoveAll(sysModuleDir) - assert.NoError(err) - err = hostIsVMContainerCapable(details) - assert.Error(err) } func TestArchKernelParamHandler(t *testing.T) {