Add robustness to test_authd_valid_name_ip
IT on wazuh 4.4
#4164
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.
Description
This PR fixes the errors reported on the issue #3455 were the
test_authd/test_authd_valid_name_ip.py
IT were failing sporadically (locally it happens more often in wazuh 4.3.X running on Ubuntu).The error occurred because all the cases were executed one after the other without cleaning the environment in between, so sometimes (after the invalid cases) it tries to validate before the environment is clean and ready.
To make sure the env is clean after each execution the fixtures
restart_authd_function
,wait_for_authd_startup_function
andclean_client_keys_file_function
were applied.Updated
deps/wazuh_testing/wazuh_testing/authd.py
tests/integration/test_authd/data/test_authd_valid_name_ip.yaml
tests/integration/test_authd/test_authd_valid_name_ip.py
Testing performed
test_authd/test_authd_valid_name_ip.py
Ubuntu 20.04
-manager
6eef7ed