Add checks for nil spec.Linux

Signed-off-by: Adam Thomason <ad@mthomason.net>
This commit is contained in:
Adam Thomason
2016-09-11 16:30:17 -07:00
parent fcbde0ce9f
commit 83cbdbd64c
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -12,7 +12,9 @@ func TestLinuxCgroupsPathSpecified(t *testing.T) {
cgroupsPath := "/user/cgroups/path/id"
spec := &specs.Spec{}
spec.Linux.CgroupsPath = &cgroupsPath
spec.Linux = &specs.Linux{
CgroupsPath: &cgroupsPath,
}
cgroup, err := createCgroupConfig("ContainerID", false, spec)
if err != nil {