Group all privileged logic together
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
@@ -419,7 +419,10 @@ func TestPrivilegedBindMount(t *testing.T) {
|
||||
t.Logf("TestCase %q", desc)
|
||||
g := generate.New()
|
||||
g.SetRootReadonly(test.readonlyRootFS)
|
||||
addOCIBindMounts(&g, nil, test.privileged)
|
||||
addOCIBindMounts(&g, nil)
|
||||
if test.privileged {
|
||||
setOCIBindMountsPrivileged(&g)
|
||||
}
|
||||
spec := g.Spec()
|
||||
if test.expectedSysFSRO {
|
||||
checkMount(t, spec.Mounts, "sysfs", "/sys", "sysfs", []string{"ro"}, nil)
|
||||
|
Reference in New Issue
Block a user