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:
Qiang Huang 2015-04-17 14:20:16 +08:00
parent 52e8fd3958
commit f010150f7d
1 changed files with 3 additions and 2 deletions

View File

@ -425,11 +425,12 @@ func testFreeze(t *testing.T, systemd bool) {
defer remove(rootfs)
config := newTemplateConfig(rootfs)
cgm := libcontainer.Cgroupfs
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)
container, err := factory.Create("test", config)