-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_synchronization
system test tries to load a list
as a JSON
#5043
Labels
Comments
rauldpm
changed the title
test_synchronization system test tries to load a
Feb 27, 2024
list
as a JSON
test_synchronization
system test tries to load a list
as a JSON
UpdateI have changed the way the queries are executed to use the same method as in other scripts. I have also changed the assert condition to adapt it to the new way of obtaining the data. I have done tests locally, getting the tests to pass completely 10 times in a row. |
NoteThe issue is in |
LGTM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The
test_synchrronization.py
is being marked as failed because it tries to load a list as a JSON. The steps are:wazuh-qa/tests/system/test_fim/test_synchronization/test_synchronization.py
Line 153 in ef98f91
https:/wazuh/wazuh-qa/blob/master/tests/system/scripts/system_query_db.py
wazuh-qa/tests/system/test_fim/test_synchronization/test_synchronization.py
Line 154 in ef98f91
But the query result is given as a list:
JSON does not know how to interpret it, resulting in the following error and failed test:
This can be reproduced using the following Python script:
It has been detected that sometimes, the query is returned as an empty list, in this case, the JSON load call accepts it and the test passes, marking the test as PASSED
If the query is given as a JSON with content, the test will fail (expected), and if the JSON query is empty, then the test will PASS
We need to review and fix this test to avoid false positives and convert the query list as a query JSON
Cataloged as
High impact bugs
because the test does not always fail, and if it does, the test will fail due to the assert (regardless of the format of the result), so we have to fix the format so that the error message is correct and we can catalog correctly the errorThe text was updated successfully, but these errors were encountered: