mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-02 08:17:01 +00:00
runtime: fix cli non-root ci
It turns out kata check needs root privilege to call modprobe otherwise it fails. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
a5589196ce
commit
359b78c1c9
@ -14,6 +14,7 @@ import (
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
ktu "github.com/kata-containers/runtime/pkg/katatestutils"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@ -44,6 +45,10 @@ func setupCheckHostIsVMContainerCapable(assert *assert.Assertions, cpuInfoFile s
|
||||
}
|
||||
|
||||
func TestCCCheckCLIFunction(t *testing.T) {
|
||||
if tc.NotValid(ktu.NeedRoot()) {
|
||||
t.Skip(testDisabledAsNonRoot)
|
||||
}
|
||||
|
||||
var cpuData []testCPUData
|
||||
var moduleData []testModuleData
|
||||
|
||||
@ -245,6 +250,10 @@ func TestCheckCheckKernelModulesNoUnrestrictedGuest(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCheckHostIsVMContainerCapable(t *testing.T) {
|
||||
if tc.NotValid(ktu.NeedRoot()) {
|
||||
t.Skip(testDisabledAsNonRoot)
|
||||
}
|
||||
|
||||
assert := assert.New(t)
|
||||
|
||||
dir, err := ioutil.TempDir("", "")
|
||||
|
Loading…
Reference in New Issue
Block a user