Use shared envTest for unit tests
Speed up unit tests by using a shared envTest. This requires each test to use its own namespace to avoid clobbering objects for other tests. Tests previously took around 8 seconds each, and now the initial test takes 2 seconds with follow up tests taking less than a second each. Also update existing tests that use a fixed namespace to use a generated namespace. Share gold file template function with yaml files. Remove the testClusterMode, and instead rely on MainTest to do the appropriate test setup and rootArgs flag setup. Move the rootArg flag setup out of NewTestEnvKubeManager to avoid side effects. A follow up change can be to push the individual setups from NewTestEnvKubeManager() into their respective TestMain since the harness share little code. Signed-off-by: Allen Porter <allen@thebends.org>
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
► deleting helmreleases thrfg in thrfg namespace
|
||||
► deleting helmreleases thrfg in {{ .ns }} namespace
|
||||
✔ helmreleases deleted
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
► annotating GitRepository thrfg in thrfg namespace
|
||||
► annotating GitRepository thrfg in {{ .ns }} namespace
|
||||
✔ GitRepository annotated
|
||||
◎ waiting for GitRepository reconciliation
|
||||
✔ GitRepository reconciliation completed
|
||||
✔ fetched revision 6.0.0/627d5c4bb67b77185f37e31d734b085019ff2951
|
||||
► annotating HelmRelease thrfg in thrfg namespace
|
||||
► annotating HelmRelease thrfg in {{ .ns }} namespace
|
||||
✔ HelmRelease annotated
|
||||
◎ waiting for HelmRelease reconciliation
|
||||
✔ HelmRelease reconciliation completed
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
► resuming helmreleases thrfg in thrfg namespace
|
||||
► resuming helmreleases thrfg in {{ .ns }} namespace
|
||||
✔ helmreleases resumed
|
||||
◎ waiting for HelmRelease reconciliation
|
||||
✔ HelmRelease reconciliation completed
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
► suspending helmreleases thrfg in thrfg namespace
|
||||
► suspending helmreleases thrfg in {{ .ns }} namespace
|
||||
✔ helmreleases suspended
|
||||
|
||||
Reference in New Issue
Block a user