From 65032b55b152c8c8d4c630fbf4eeb63ba7159e87 Mon Sep 17 00:00:00 2001 From: Kenta Tada Date: Tue, 21 May 2019 09:10:38 +0900 Subject: [PATCH] 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 --- libcontainer/container_linux_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libcontainer/container_linux_test.go b/libcontainer/container_linux_test.go index 9e06865d..0bf8803d 100644 --- a/libcontainer/container_linux_test.go +++ b/libcontainer/container_linux_test.go @@ -200,6 +200,7 @@ func TestGetContainerState(t *testing.T) { {Type: configs.NEWUTS}, // emulate host for IPC //{Type: configs.NEWIPC}, + {Type: configs.NEWCGROUP}, }, }, initProcess: &mockProcess{ @@ -278,6 +279,8 @@ func TestGetContainerState(t *testing.T) { file = "user" case configs.NEWUTS: file = "uts" + case configs.NEWCGROUP: + file = "cgroup" } expected := fmt.Sprintf("/proc/%d/ns/%s", pid, file) if expected != path {