obmarg/kazan

Integration test improvement suggestions

Opened this issue · 3 comments

I suggest the following changes to the integration test:

  1. Create a namespace and run tests that create objects against that namespace - this allows for the namespace to be deleted in a module levelon_exit callback, thus ensuring everything is cleaned up.
  2. Use the alpine image for the pod that is created rather than obmarg/health-proxy as alpine is small and will be pulled quickly.
  3. Do not assume there are no ClusterRoles in the test RBAC Authorization V1 Beta 1 API as this depends on having a fresh K8S installation.

I'm quite happy to create a PR for this if you agree.

  1. Sounds sensible. Guess this would also make it less likely for existing pods to mess up tests.
  2. obmarg/health-proxy is only 8MB, but if alpine itself is smaller then yeah, go for it.
  3. Also seems sensible.

Some good ideas 👍

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...