specconv: add a test case to check null spec.Process
@@ -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")
+ }
+}
