Reorganize credhub tests so that test setup is not run when tests are skipped #615
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this change about?
Because 'AssistedCredhubDescribe' and 'NonAssistedCredhubDescribe' were nested under the top-level 'CredhubDescribe', the BeforeEach of the top-level describe block would be run even when Assisted or NonAssisted tests were skipped. This removes the top-level CredhubDescribe and uses helper functions for the set up functionality shared by the two types of tests.
What version of cf-deployment have you run this cf-acceptance-test change against?
v21.8.0
Please check all that apply for this PR:
Did you update the README as appropriate for this change?
If you are introducing a new acceptance test, what is your rationale for including it CATs rather than your own acceptance test suite?
N/A
How many more (or fewer) seconds of runtime will this change introduce to CATs?
This test saves as much as 3 minutes and 20 seconds from the test suite. The unnecessary test setup takes about 100 seconds, so in cases where all credhub tests are skipped, this saves about 200 seconds or 3 minutes and 20 seconds.
What is the level of urgency for publishing this change?
Tag your pair, your PM, and/or team!