Integration test improvement suggestions
Opened this issue · 3 comments
chazsconi commented
I suggest the following changes to the integration test:
- Create a namespace and run tests that create objects against that namespace - this allows for the namespace to be deleted in a module level
on_exit
callback, thus ensuring everything is cleaned up. - Use the
alpine
image for the pod that is created rather thanobmarg/health-proxy
asalpine
is small and will be pulled quickly. - Do not assume there are no
ClusterRoles
in the testRBAC Authorization V1 Beta 1 API
as this depends on having a fresh K8S installation.
chazsconi commented
I'm quite happy to create a PR for this if you agree.
obmarg commented
- Sounds sensible. Guess this would also make it less likely for existing pods to mess up tests.
obmarg/health-proxy
is only 8MB, but ifalpine
itself is smaller then yeah, go for it.- Also seems sensible.
Some good ideas 👍
obmarg commented
Re: 1. - Would it make sense to create a unique namespace for each tests (using a uuid as the name or something). That way integration tests can continue to run async without interfering with each other...