test: Refactor test handler

While authoring [0], it was discovered that Armada has duplicate logic
for deciding if Helm test cleanup should be enabled as well as the tests
themselves. Because of this, changes to test logic (e.g. adding pre-test
actions), requires changing all traces of the repeated logic, which can
lead to inconsistent behavior if not properly addressed. This change
moves all test decision logic to a singular Test handler, implemented by
the `Test` class. This change does NOT change the expected behavior of
testing during upgrades; however, tests initiated from the API and CLI
will not execute when testing a manifest if they are disabled in a
chart, unless using the `--enable-all` flag.

[0] https://review.openstack.org/617834

Change-Id: I1530d7637b0eb6a83f048895053a5db80d033046
This commit is contained in:
Drew Walters
2018-11-14 17:05:28 +00:00
parent a64d435de8
commit adfe3ae505
11 changed files with 401 additions and 158 deletions

View File

@@ -24,6 +24,8 @@ Commands
$ armada test --release blog-1
Options:
--cleanup Delete test pods after test completion
--enable-all Run disabled chart tests
--file TEXT armada manifest
--release TEXT helm release
--tiller-host TEXT Tiller Host IP