CP-48198: test_filter_xapi_clusterd_db.py: Self-test asserting the expected output #104
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.
test_filter_xapi_clusterd_db.py
: Self-test asserting the expected outputThe motivation for this PR is that I wanted to confirm that the clusterd secrets are really removed from the collected clusterd database data in the context of the question on another PR were we are looking at the clusterd on whether we can rely on the status-report to really safely filter the secrets in the cluster DB.
To double-check that we can rely on the checks in
test_filter_xapi_clusterd_db.py
, I reviewed them again to ensure that they work as required.Changes:
Merges test_pems_blobs() and test_remove_token() into test_removal_of_all_secrets()
Adds new self-tests:
test_assertion_on_unexpected_token()
(Check assert on token that is not expected)test_assertion_on_unexpected_authkey()
(Check assert on authkey that is not expected)These verify that the common test function
assert_filter_xapi_clusterd_db()
really detect if the output is not filtered properly.