Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
test: fix cgroup mock test
Browse files Browse the repository at this point in the history
fix cgroup mock test because of containerd/cgroup vendor update

Signed-off-by: Ace-Tang <aceapril@126.com>
  • Loading branch information
Ace-Tang committed Aug 19, 2019
1 parent 6534357 commit dc38ba7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions virtcontainers/cgroups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit dc38ba7

Please sign in to comment.