You've already forked runc
mirror of
https://github.com/opencontainers/runc.git
synced 2025-08-01 05:06:52 +03:00
libcontainer: fix TestGetContainerState to check configs.NEWCGROUP
This test needs to handle the case of configs.NEWCGROUP as Namespace's type. Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
This commit is contained in:
@ -200,6 +200,7 @@ func TestGetContainerState(t *testing.T) {
|
|||||||
{Type: configs.NEWUTS},
|
{Type: configs.NEWUTS},
|
||||||
// emulate host for IPC
|
// emulate host for IPC
|
||||||
//{Type: configs.NEWIPC},
|
//{Type: configs.NEWIPC},
|
||||||
|
{Type: configs.NEWCGROUP},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
initProcess: &mockProcess{
|
initProcess: &mockProcess{
|
||||||
@ -278,6 +279,8 @@ func TestGetContainerState(t *testing.T) {
|
|||||||
file = "user"
|
file = "user"
|
||||||
case configs.NEWUTS:
|
case configs.NEWUTS:
|
||||||
file = "uts"
|
file = "uts"
|
||||||
|
case configs.NEWCGROUP:
|
||||||
|
file = "cgroup"
|
||||||
}
|
}
|
||||||
expected := fmt.Sprintf("/proc/%d/ns/%s", pid, file)
|
expected := fmt.Sprintf("/proc/%d/ns/%s", pid, file)
|
||||||
if expected != path {
|
if expected != path {
|
||||||
|
Reference in New Issue
Block a user