diff --git a/libcontainer/specconv/spec_linux_test.go b/libcontainer/specconv/spec_linux_test.go index aca5ca5e..706df41c 100644 --- a/libcontainer/specconv/spec_linux_test.go +++ b/libcontainer/specconv/spec_linux_test.go @@ -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") + } +}