specconv: add a test case to check null spec.Process

Signed-off-by: l00397676 <lujingxiao@huawei.com>
This commit is contained in:
l00397676 2018-06-17 20:42:04 +08:00
parent bbaba4c081
commit 62cfad97ca
1 changed files with 13 additions and 0 deletions

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