diff --git a/api/test/integration/common.yaml b/api/test/integration/common.yaml
index 96249de2fa8..029c0410177 100644
--- a/api/test/integration/common.yaml
+++ b/api/test/integration/common.yaml
@@ -168,7 +168,7 @@ variables:
no
20s
100s
- yes
+ no
@@ -197,7 +197,7 @@ variables:
- valid_ossec_conf_with_update_check_disabled:
+ valid_ossec_conf_with_update_check_enabled:
yes
@@ -207,7 +207,8 @@ variables:
no
20s
100s
- no
+ yes
+ http://cti:4041
diff --git a/api/test/integration/env/base/cti/http_server.py b/api/test/integration/env/base/cti/http_server.py
index 3ac27eaea7b..98a26fb4194 100644
--- a/api/test/integration/env/base/cti/http_server.py
+++ b/api/test/integration/env/base/cti/http_server.py
@@ -37,7 +37,6 @@ def do_GET(self):
self.send_header('Content-Type', 'application/json')
self.end_headers()
- # Return JSON mock response
data = json.dumps(MOCK_RESPONSE).encode('utf-8')
self.wfile.write(data)
else:
diff --git a/api/test/integration/test_manager_endpoints.tavern.yaml b/api/test/integration/test_manager_endpoints.tavern.yaml
index 0dff3735db7..5081aa0fcd1 100644
--- a/api/test/integration/test_manager_endpoints.tavern.yaml
+++ b/api/test/integration/test_manager_endpoints.tavern.yaml
@@ -1239,6 +1239,45 @@ stages:
save:
json:
wazuh_version: data.api_version
+
+ - name: Enable update check
+ request:
+ verify: False
+ url: "{protocol:s}://{host:s}:{port:d}/manager/configuration"
+ method: PUT
+ data: "{valid_ossec_conf_with_update_check_enabled:s}"
+ headers:
+ Authorization: "Bearer {test_login_token}"
+ content-type: application/octet-stream
+ response:
+ status_code: 200
+ json:
+ data:
+ affected_items:
+ - 'manager'
+ failed_items: []
+ total_affected_items: 1
+ total_failed_items: 0
+ error: 0
+
+ - name: Restart manager to apply the configuration
+ request:
+ verify: False
+ url: "{protocol:s}://{host:s}:{port:d}/manager/restart"
+ method: PUT
+ headers:
+ Authorization: "Bearer {test_login_token}"
+ response:
+ status_code: 200
+ json:
+ error: 0
+ data:
+ affected_items:
+ - !anystr
+ failed_items: []
+ total_affected_items: 1
+ total_failed_items: 0
+ delay_after: 50
- name: Get available updates
request:
@@ -1300,7 +1339,7 @@ stages:
verify: False
url: "{protocol:s}://{host:s}:{port:d}/manager/configuration"
method: PUT
- data: "{valid_ossec_conf_with_update_check_disabled:s}"
+ data: "{valid_ossec_conf:s}"
headers:
Authorization: "Bearer {test_login_token}"
content-type: application/octet-stream
@@ -1366,45 +1405,6 @@ stages:
current_version: "v{wazuh_version:s}"
update_check: false
- - name: Enable the update check
- request:
- verify: False
- url: "{protocol:s}://{host:s}:{port:d}/manager/configuration"
- method: PUT
- data: "{valid_ossec_conf:s}"
- headers:
- Authorization: "Bearer {test_login_token}"
- content-type: application/octet-stream
- response:
- status_code: 200
- json:
- data:
- affected_items:
- - 'manager'
- failed_items: []
- total_affected_items: 1
- total_failed_items: 0
- error: 0
-
- - name: Restart manager to apply the configuration
- request:
- verify: False
- url: "{protocol:s}://{host:s}:{port:d}/manager/restart"
- method: PUT
- headers:
- Authorization: "Bearer {test_login_token}"
- response:
- status_code: 200
- json:
- error: 0
- data:
- affected_items:
- - !anystr
- failed_items: []
- total_affected_items: 1
- total_failed_items: 0
- delay_after: 50
-
---
test_name: GET /manager/version/check with update check service error