diff --git a/CHANGELOG.md b/CHANGELOG.md index 98e4026f56..ae3e166f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,7 @@ Release report: TBD - Fix error in requirements.txt ([#3689](https://github.com/wazuh/wazuh-qa/pull/3689)) \- (Framework) - Fix sleep time in `test_agent_default_group_added`. ([#3692](https://github.com/wazuh/wazuh-qa/pull/3692)) \- (Tests) - Fix syscollector deltas integration tests. ([#3695](https://github.com/wazuh/wazuh-qa/pull/3695)) \- (Tests) +- Fix test_response_postprocessing: duplicated slash in API endpoints ([#4048](https://github.com/wazuh/wazuh-qa/pull/4048)) \- (Tests) ### Removed diff --git a/tests/integration/test_api/conftest.py b/tests/integration/test_api/conftest.py index b83d7419a5..eae910d6a8 100644 --- a/tests/integration/test_api/conftest.py +++ b/tests/integration/test_api/conftest.py @@ -4,15 +4,16 @@ import os import shutil + import pytest import wazuh_testing as fw from wazuh_testing import api -from wazuh_testing.tools.file import truncate_file -from wazuh_testing.tools.monitoring import FileMonitor -from wazuh_testing.tools import services as svcs from wazuh_testing.modules.api import event_monitor as evm from wazuh_testing.tools import configuration as conf +from wazuh_testing.tools import services as svcs +from wazuh_testing.tools.file import truncate_file +from wazuh_testing.tools.monitoring import FileMonitor @pytest.fixture(scope='module') @@ -144,6 +145,7 @@ def restart_api_module(request): # Start Wazuh API svcs.control_service('start') + evm.check_api_start_log(file_monitor) @pytest.fixture(scope='module') diff --git a/tests/integration/test_api/test_middlewares/test_response_postprocessing.py b/tests/integration/test_api/test_middlewares/test_response_postprocessing.py index fd92f858ce..166c7340a7 100644 --- a/tests/integration/test_api/test_middlewares/test_response_postprocessing.py +++ b/tests/integration/test_api/test_middlewares/test_response_postprocessing.py @@ -122,7 +122,7 @@ def test_response_postprocessing(restart_api_module, get_api_details, method, en headers = api_details['auth_headers'] if use_login_token else api.get_login_headers('wrong_user', 'wrong_password') # Make an API request - response = getattr(requests, method.lower())(f"{api_details['base_url']}/{endpoint_url}", headers=headers, + response = getattr(requests, method.lower())(f"{api_details['base_url']}{endpoint_url}", headers=headers, verify=False, json=json_body) assert response.headers['Content-Type'] == 'application/problem+json; charset=utf-8'