mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
Add checks for nil spec.Linux
Signed-off-by: Adam Thomason <ad@mthomason.net>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user