Skip to content

cgroups/fs tests: unify TestInvalid*Cgroup*#2540

Merged
mrunalp merged 1 commit into
opencontainers:masterfrom
kolyshkin:unify-test-inval-cgroup
Aug 17, 2020
Merged

cgroups/fs tests: unify TestInvalid*Cgroup*#2540
mrunalp merged 1 commit into
opencontainers:masterfrom
kolyshkin:unify-test-inval-cgroup

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

this comes from #2497 which is now closed

All the test cases are doing the same checks, only input differs,
so we can unify those using a test data table.

While at it:

  • use t.Fatalf where it makes sense (no further checks are possible);
  • remove the "XXX" comments as we won't get rid of cgroup Name/Parent.

PS I tried using t.Parallel() as well but it did not result in any
noticeable speedup, so I dropped it for simplicity.

Signed-off-by: Kir Kolyshkin kolyshkin@gmail.com

All the test cases are doing the same checks, only input differs,
so we can unify those using a test data table.

While at it:
 - use t.Fatalf where it makes sense (no further checks are possible);
 - remove the "XXX" comments as we won't get rid of cgroup Name/Parent.

PS I tried using t.Parallel() as well but it did not result in any
noticeable speedup, so I dropped it for simplicity.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@mrunalp mrunalp merged commit b70de38 into opencontainers:master Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants