specconv: add a test case to check null spec.Process
Signed-off-by: l00397676 <lujingxiao@huawei.com>
This commit is contained in:
parent
bbaba4c081
commit
62cfad97ca
|
@ -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