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

Provide easy to find testcases so they can be used as examples in demos and presentations #65

Open
viccuad opened this issue Jun 23, 2023 · 0 comments

Comments

@viccuad
Copy link
Member

viccuad commented Jun 23, 2023

When demoing Kubewarden internally and externally, it would be helpful to have ready-made resource definitions in Yaml to use.

Acceptance criteria

  • Search and reuse if possible existing art and testsuites that already provide insecure resource examples.
  • Refactor E2E tests so individual testcases, their code, and the expected results are together. For example, a single folder for mutating requests or policies would contain its .bats file, showcasing how the test is run and what to expect, and the needed resource .yaml to trigger it.
  • Add more examples of insecure resources (example: a Pod with an aws secret key, a Job with privileged containers, etc). These examples should be easily applied to a cluster: in Yaml format, with a defined namespace that is the same for all the examples, and so on.
  • Policy e2e tests, which use kwctl run and the admission Request JSON, sadly cannot be reused as full Kubewarden E2E tests.
    Still, they are a big testcase corpus that we aren't taping into. It could be possible to, from resource definitions in yaml, craft those admission requests programatically, and then consume the admission requests JSONs with kwctl run as we do now. Maybe with something like kubectl create foo bar --dry-run=server -v=9.
    If that would be possible, we could reuse the yaml resource definitions as examples or in Kubewarden full E2E testcases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant