Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] privileged and privileged_containers tests have very similar pass messages #1200

Closed
HashNuke opened this issue Feb 3, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@HashNuke
Copy link
Collaborator

HashNuke commented Feb 3, 2022

Describe the bug

privileged and privileged_containers tests have very similar pass messages. Making it harder to identify what was tested.

privileged test has the following pass message

PASSED: No privileged containers

privileged_containers test has the following pass message

PASSED: No privileged containers were found

When the workload tests are run, the output looks like below.
CleanShot 2022-02-03 at 15 08 36@2x

To Reproduce

./cnf-testsuite privileged
./cnf-testsuite privileged_containers

Expected behaviour

  • A different/clearer/concise message that mentions that was tested for in each of these pass messages.
  • OR if these two tests overlap then one of these tests should be removed.
@taylor
Copy link
Collaborator

taylor commented Mar 28, 2022

@HashNuke @denverwilliams @agentpoyo are these duplicate tests?

@lixuna
Copy link
Collaborator

lixuna commented Mar 30, 2022

The description in the code is the same for these two tests as well

See:
https://github.com/cncf/cnf-testsuite/blob/v0.27.0/src/tasks/workload/security.cr#L125

desc "Check if any containers are running in privileged mode"
task "privileged" do |_, args|

And:
https://github.com/cncf/cnf-testsuite/blob/v0.27.0/src/tasks/workload/security.cr#L156

desc "Check if any containers are running in privileged mode"
task "privilege_escalation", ["kubescape_scan"] do |_, args|

@agentpoyo
Copy link
Collaborator

Yes, I believe they are performing the same basic check of whether the containers are in privileged mode or not, we should pick one and remove one. @taylor

@kosstennbl
Copy link
Collaborator

This duplicity in tests was removed by #2119.

@kosstennbl kosstennbl closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants