Merge pull request #1826 from jingxiaolu/fix_specconv_process_nil
specconv: fix null spec.Process making runc panic
This commit is contained in:
commit
3087d43bc8
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue