opencontainers / opencontainers/cgroups

Consider moving the mockCgroup from runc

Open
#61 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29
Forks
32
PR merge metrics
No merged PRs in 30d

Description

In runc we use this module and have a mock that implements the cgroup interface. However, when a method is added to it (as it happened with the Stats method in release 0.0.7: https://github.com/opencontainers/cgroups/commit/dbb23b4a9f903c8686a51a68e2e7ae461053e779), we need to manually sync the mock with the new method.

I'd move the mock to this repo. This way upgrades are simpler, and providing mocks for your interfaces to be tested is usually a good practice. Also, if others are using this, they will benefit.

What do you think?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing runc's mockCgroup with the cgroup interface in this repository, especially the Stats method added in release 0.0.7 and the linked commit. Determine where the mock belongs and how it can be exposed for users' tests; done means the mock is maintained here so interface changes no longer require manual synchronization in runc.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems, testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.