From dc38ba77bd8ae620200af91cacd08cc61cf98973 Mon Sep 17 00:00:00 2001 From: Ace-Tang Date: Mon, 19 Aug 2019 16:47:22 +0800 Subject: [PATCH] test: fix cgroup mock test fix cgroup mock test because of containerd/cgroup vendor update Signed-off-by: Ace-Tang --- virtcontainers/cgroups_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/virtcontainers/cgroups_test.go b/virtcontainers/cgroups_test.go index 27d848f5c5..361cb066a3 100644 --- a/virtcontainers/cgroups_test.go +++ b/virtcontainers/cgroups_test.go @@ -72,11 +72,15 @@ func (m *mockCgroup) Subsystems() []cgroups.Subsystem { return nil } -func mockCgroupNew(hierarchy cgroups.Hierarchy, path cgroups.Path, resources *specs.LinuxResources) (cgroups.Cgroup, error) { +func (m *mockCgroup) Tasks(cgroups.Name, bool) ([]cgroups.Task, error) { + return nil, nil +} + +func mockCgroupNew(hierarchy cgroups.Hierarchy, path cgroups.Path, resources *specs.LinuxResources, opts ...cgroups.InitOpts) (cgroups.Cgroup, error) { return &mockCgroup{}, nil } -func mockCgroupLoad(hierarchy cgroups.Hierarchy, path cgroups.Path) (cgroups.Cgroup, error) { +func mockCgroupLoad(hierarchy cgroups.Hierarchy, path cgroups.Path, opts ...cgroups.InitOpts) (cgroups.Cgroup, error) { return &mockCgroup{}, nil }