1
0
mirror of https://github.com/opencontainers/runc.git synced 2025-08-08 12:42:06 +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:
Mrunal Patel
2020-03-23 21:07:06 -07:00
committed by GitHub

View File

@@ -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")
}
}