fix freeze systemd test
Made a mistake before, freeze test doesn't use newContainer, systemd test doesn't actually work. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
52e8fd3958
commit
f010150f7d
|
@ -425,11 +425,12 @@ func testFreeze(t *testing.T, systemd bool) {
|
||||||
defer remove(rootfs)
|
defer remove(rootfs)
|
||||||
|
|
||||||
config := newTemplateConfig(rootfs)
|
config := newTemplateConfig(rootfs)
|
||||||
|
cgm := libcontainer.Cgroupfs
|
||||||
if systemd {
|
if systemd {
|
||||||
config.Cgroups.Slice = "system.slice"
|
cgm = libcontainer.SystemdCgroups
|
||||||
}
|
}
|
||||||
|
|
||||||
factory, err := libcontainer.New(root, libcontainer.Cgroupfs)
|
factory, err := libcontainer.New(root, cgm)
|
||||||
ok(t, err)
|
ok(t, err)
|
||||||
|
|
||||||
container, err := factory.Create("test", config)
|
container, err := factory.Create("test", config)
|
||||||
|
|
Loading…
Reference in New Issue