mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/cg/dev: fix TestSetV1Allow panic
This test panics if userns is detected (such as when run in a rootless docker container) because SetV1 does nothing in this case. We could fix the panic, but it doesn't make sense to run the test at all. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/opencontainers/runc/libcontainer/cgroups/fscommon"
|
||||
"github.com/opencontainers/runc/libcontainer/configs"
|
||||
"github.com/opencontainers/runc/libcontainer/devices"
|
||||
"github.com/opencontainers/runc/libcontainer/userns"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -17,6 +18,9 @@ func init() {
|
||||
}
|
||||
|
||||
func TestSetV1Allow(t *testing.T) {
|
||||
if userns.RunningInUserNS() {
|
||||
t.Skip("userns detected; setV1 does nothing")
|
||||
}
|
||||
dir := t.TempDir()
|
||||
|
||||
for file, contents := range map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user