integration: check a container state after resumning the CT
Otherwise CT will be left in a frozen state in a fail case Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
parent
5162e5a81c
commit
6fc1dd5f25
|
@ -384,12 +384,12 @@ func TestFreeze(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if state != configs.Paused {
|
|
||||||
t.Fatal("Unexpected state: ", state)
|
|
||||||
}
|
|
||||||
if err := container.Resume(); err != nil {
|
if err := container.Resume(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
if state != configs.Paused {
|
||||||
|
t.Fatal("Unexpected state: ", state)
|
||||||
|
}
|
||||||
|
|
||||||
stdinW.Close()
|
stdinW.Close()
|
||||||
s, err := process.Wait()
|
s, err := process.Wait()
|
||||||
|
|
|
@ -40,6 +40,7 @@ func newTemplateConfig(rootfs string) *configs.Config {
|
||||||
{Name: "NEWNET"},
|
{Name: "NEWNET"},
|
||||||
},
|
},
|
||||||
Cgroups: &cgroups.Cgroup{
|
Cgroups: &cgroups.Cgroup{
|
||||||
|
Name: "test",
|
||||||
Parent: "integration",
|
Parent: "integration",
|
||||||
AllowAllDevices: false,
|
AllowAllDevices: false,
|
||||||
AllowedDevices: devices.DefaultAllowedDevices,
|
AllowedDevices: devices.DefaultAllowedDevices,
|
||||||
|
|
Loading…
Reference in New Issue