You've already forked runc
mirror of
https://github.com/opencontainers/runc.git
synced 2025-08-09 23:42:44 +03:00
Merge pull request #1826 from jingxiaolu/fix_specconv_process_nil
specconv: fix null spec.Process making runc panic
This commit is contained in:
@@ -585,3 +585,16 @@ func TestInitSystemdProps(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestNullProcess(t *testing.T) {
|
||||||
|
spec := Example()
|
||||||
|
spec.Process = nil
|
||||||
|
|
||||||
|
_, err := CreateLibcontainerConfig(&CreateOpts{
|
||||||
|
Spec: spec,
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("Null process should be forbidden")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user