diff --git a/plugins/module_utils/foreman_helper.py b/plugins/module_utils/foreman_helper.py index fab8bd116c..e7d9b585cc 100644 --- a/plugins/module_utils/foreman_helper.py +++ b/plugins/module_utils/foreman_helper.py @@ -1755,9 +1755,7 @@ def _is_resolved(spec, what): # Helper for (global, operatingsystem, ...) parameters def parameter_value_to_str(value, parameter_type): """Helper to convert the value of parameters to string according to their parameter_type.""" - if parameter_type in ['real', 'integer']: - parameter_string = str(value) - elif parameter_type in ['array', 'hash', 'yaml', 'json']: + if parameter_type in ['real', 'integer', 'string', 'array', 'hash', 'yaml', 'json'] and not isinstance(value, six.string_types): parameter_string = json.dumps(value, sort_keys=True) else: parameter_string = value diff --git a/tests/test_playbooks/fixtures/global_parameter-0.yml b/tests/test_playbooks/fixtures/global_parameter-0.yml index 511e4bbb75..8eee6aa467 100644 --- a/tests/test_playbooks/fixtures/global_parameter-0.yml +++ b/tests/test_playbooks/fixtures/global_parameter-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '175' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,13 +106,11 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '175' status: code: 200 message: OK - request: - body: '{"common_parameter": {"name": "TheAnswer", "value": 42, "parameter_type": + body: '{"common_parameter": {"name": "TheAnswer", "value": "42", "parameter_type": "string"}}' headers: Accept: @@ -124,7 +120,7 @@ interactions: Connection: - keep-alive Content-Length: - - '84' + - '86' Content-Type: - application/json User-Agent: @@ -133,13 +129,15 @@ interactions: uri: https://foreman.example.org/api/common_parameters response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:30 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":42}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:28 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '189' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/global_parameter-1.yml b/tests/test_playbooks/fixtures/global_parameter-1.yml index 39da88f9a8..9f539dcc86 100644 --- a/tests/test_playbooks/fixtures/global_parameter-1.yml +++ b/tests/test_playbooks/fixtures/global_parameter-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:30 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"string\",\"value\":42}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:28 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"string\",\"value\":\"42\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '364' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:30 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":42}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:28 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '189' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-10.yml b/tests/test_playbooks/fixtures/global_parameter-10.yml index 4e8dd0b3af..42af7f32db 100644 --- a/tests/test_playbooks/fixtures/global_parameter-10.yml +++ b/tests/test_playbooks/fixtures/global_parameter-10.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:33 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"real\",\"value\":3.14}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:33 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"real\",\"value\":3.14}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:33 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"real","value":3.14}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:33 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"real","value":3.14}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-11.yml b/tests/test_playbooks/fixtures/global_parameter-11.yml index c7f47fe6b4..6b75ec7bcc 100644 --- a/tests/test_playbooks/fixtures/global_parameter-11.yml +++ b/tests/test_playbooks/fixtures/global_parameter-11.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:33 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"real\",\"value\":3.14}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:33 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"real\",\"value\":3.14}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:33 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"real","value":3.14}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:33 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"real","value":3.14}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK @@ -189,16 +181,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:34 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":""}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:34 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":""}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -212,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -229,8 +221,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-12.yml b/tests/test_playbooks/fixtures/global_parameter-12.yml index ef5a32175f..260619d058 100644 --- a/tests/test_playbooks/fixtures/global_parameter-12.yml +++ b/tests/test_playbooks/fixtures/global_parameter-12.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:34 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"string\",\"value\":\"\"}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:34 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"string\",\"value\":\"\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:34 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":""}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:34 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":""}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-13.yml b/tests/test_playbooks/fixtures/global_parameter-13.yml index 2c29d13987..f796252491 100644 --- a/tests/test_playbooks/fixtures/global_parameter-13.yml +++ b/tests/test_playbooks/fixtures/global_parameter-13.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:34 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"string\",\"value\":\"\"}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:34 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"string\",\"value\":\"\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:34 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":""}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:34 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":""}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK @@ -189,16 +181,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:35 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"boolean","value":true}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:35 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"boolean","value":true}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '190' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -212,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -229,8 +221,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '191' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-14.yml b/tests/test_playbooks/fixtures/global_parameter-14.yml index 29858a40a2..1501474f44 100644 --- a/tests/test_playbooks/fixtures/global_parameter-14.yml +++ b/tests/test_playbooks/fixtures/global_parameter-14.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:35 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"boolean\",\"value\":true}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:35 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"boolean\",\"value\":true}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '365' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '366' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:35 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"boolean","value":true}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:35 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"boolean","value":true}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '190' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '191' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-15.yml b/tests/test_playbooks/fixtures/global_parameter-15.yml index 03fa478505..329afbe157 100644 --- a/tests/test_playbooks/fixtures/global_parameter-15.yml +++ b/tests/test_playbooks/fixtures/global_parameter-15.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:35 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"boolean\",\"value\":true}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:35 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"boolean\",\"value\":true}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '365' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '366' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:35 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"boolean","value":true}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:35 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"boolean","value":true}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '190' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '191' status: code: 200 message: OK @@ -189,16 +181,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:36 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":"''"}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:36 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":"''"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '188' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -212,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -229,8 +221,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '189' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-16.yml b/tests/test_playbooks/fixtures/global_parameter-16.yml index 576cb0c426..9d818c2dbf 100644 --- a/tests/test_playbooks/fixtures/global_parameter-16.yml +++ b/tests/test_playbooks/fixtures/global_parameter-16.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:36 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"string\",\"value\":\"'\"}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:36 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"string\",\"value\":\"'\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '363' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '364' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:36 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":"''"}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:36 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":"''"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '188' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '189' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-17.yml b/tests/test_playbooks/fixtures/global_parameter-17.yml index b4e3321667..591c9948f8 100644 --- a/tests/test_playbooks/fixtures/global_parameter-17.yml +++ b/tests/test_playbooks/fixtures/global_parameter-17.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:36 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"string\",\"value\":\"'\"}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:36 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"string\",\"value\":\"'\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '363' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '364' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:36 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":"''"}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:36 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":"''"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '188' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '189' status: code: 200 message: OK @@ -190,16 +182,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:37 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"hash","value":{"1":"b","a":2}}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:37 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"hash","value":{"1":"b","a":2}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '198' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '199' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-18.yml b/tests/test_playbooks/fixtures/global_parameter-18.yml index fdcef586e2..be2d6f144d 100644 --- a/tests/test_playbooks/fixtures/global_parameter-18.yml +++ b/tests/test_playbooks/fixtures/global_parameter-18.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:37 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"hash\",\"value\":{\"1\":\"b\",\"a\":2}}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:37 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"hash\",\"value\":{\"1\":\"b\",\"a\":2}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '373' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '374' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:37 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"hash","value":{"1":"b","a":2}}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:37 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"hash","value":{"1":"b","a":2}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '198' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '199' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-19.yml b/tests/test_playbooks/fixtures/global_parameter-19.yml index eb658dc257..d237614e53 100644 --- a/tests/test_playbooks/fixtures/global_parameter-19.yml +++ b/tests/test_playbooks/fixtures/global_parameter-19.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:37 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"hash\",\"value\":{\"1\":\"b\",\"a\":2}}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:37 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"hash\",\"value\":{\"1\":\"b\",\"a\":2}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '373' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '374' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:37 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"hash","value":{"1":"b","a":2}}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:37 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"hash","value":{"1":"b","a":2}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '198' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '199' status: code: 200 message: OK @@ -190,16 +182,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:38 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"array","value":["a",2,true,0.001]}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:39 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"array","value":["a",2,true,0.001]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '202' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '203' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-2.yml b/tests/test_playbooks/fixtures/global_parameter-2.yml index 2e7ead5f7a..68c8660f69 100644 --- a/tests/test_playbooks/fixtures/global_parameter-2.yml +++ b/tests/test_playbooks/fixtures/global_parameter-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22my_param%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"my_param\\\"\",\n \"sort\": {\n \ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"my_param\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '174' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,13 +106,11 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '174' status: code: 200 message: OK - request: - body: '{"common_parameter": {"name": "my_param", "value": 42, "parameter_type": + body: '{"common_parameter": {"name": "my_param", "value": "42", "parameter_type": "string"}}' headers: Accept: @@ -124,7 +120,7 @@ interactions: Connection: - keep-alive Content-Length: - - '83' + - '85' Content-Type: - application/json User-Agent: @@ -133,13 +129,15 @@ interactions: uri: https://foreman.example.org/api/common_parameters response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:30 - UTC","hidden_value?":false,"hidden_value":"*****","id":12,"name":"my_param","parameter_type":"string","value":42}' + string: '{"created_at":"2023-08-24 07:13:29 UTC","updated_at":"2023-08-24 07:13:29 + UTC","hidden_value?":false,"hidden_value":"*****","id":10,"name":"my_param","parameter_type":"string","value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '189' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/global_parameter-20.yml b/tests/test_playbooks/fixtures/global_parameter-20.yml index f414145be0..07d610af3b 100644 --- a/tests/test_playbooks/fixtures/global_parameter-20.yml +++ b/tests/test_playbooks/fixtures/global_parameter-20.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:38 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"array\",\"value\":[\"a\",2,true,0.001]}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:39 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"array\",\"value\":[\"a\",2,true,0.001]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '377' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '378' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:38 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"array","value":["a",2,true,0.001]}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:39 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"array","value":["a",2,true,0.001]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '202' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '203' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-21.yml b/tests/test_playbooks/fixtures/global_parameter-21.yml index 9fe2514106..b0ddbb589f 100644 --- a/tests/test_playbooks/fixtures/global_parameter-21.yml +++ b/tests/test_playbooks/fixtures/global_parameter-21.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:38 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"array\",\"value\":[\"a\",2,true,0.001]}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:39 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"array\",\"value\":[\"a\",2,true,0.001]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '377' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '378' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:38 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"array","value":["a",2,true,0.001]}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:39 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"array","value":["a",2,true,0.001]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '202' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '203' status: code: 200 message: OK @@ -190,16 +182,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:39 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"yaml","value":["alpha",{"beta":["a",1]}]}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:40 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"yaml","value":["alpha",{"beta":["a",1]}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '209' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '210' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-22.yml b/tests/test_playbooks/fixtures/global_parameter-22.yml index a60a7d0411..9059a04210 100644 --- a/tests/test_playbooks/fixtures/global_parameter-22.yml +++ b/tests/test_playbooks/fixtures/global_parameter-22.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,18 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:39 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"yaml\",\"value\":[\"alpha\",{\"beta\":[\"a\",1]}]}]\n\ - }\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:40 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"yaml\",\"value\":[\"alpha\",{\"beta\":[\"a\",1]}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '384' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -112,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -129,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:39 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"yaml","value":["alpha",{"beta":["a",1]}]}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:40 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"yaml","value":["alpha",{"beta":["a",1]}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '209' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '210' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-23.yml b/tests/test_playbooks/fixtures/global_parameter-23.yml index d1fa8d8a9d..0648ca220c 100644 --- a/tests/test_playbooks/fixtures/global_parameter-23.yml +++ b/tests/test_playbooks/fixtures/global_parameter-23.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,18 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:39 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"yaml\",\"value\":[\"alpha\",{\"beta\":[\"a\",1]}]}]\n\ - }\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:40 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"yaml\",\"value\":[\"alpha\",{\"beta\":[\"a\",1]}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '384' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -112,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -129,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:39 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"yaml","value":["alpha",{"beta":["a",1]}]}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:40 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"yaml","value":["alpha",{"beta":["a",1]}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '209' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '210' status: code: 200 message: OK @@ -191,16 +182,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:39 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"json","value":{"name":"test","tags":["a","b","c"],"value":4}}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:41 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"json","value":{"name":"test","tags":["a","b","c"],"value":4}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '229' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -214,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -231,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '230' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-24.yml b/tests/test_playbooks/fixtures/global_parameter-24.yml index 9bea6a4c2a..ac3c721a47 100644 --- a/tests/test_playbooks/fixtures/global_parameter-24.yml +++ b/tests/test_playbooks/fixtures/global_parameter-24.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,18 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:39 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"json\",\"value\":{\"name\":\"test\",\"tags\":[\"a\"\ - ,\"b\",\"c\"],\"value\":4}}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:41 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"json\",\"value\":{\"name\":\"test\",\"tags\":[\"a\",\"b\",\"c\"],\"value\":4}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '404' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -112,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '405' status: code: 200 message: OK @@ -129,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:39 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"json","value":{"name":"test","tags":["a","b","c"],"value":4}}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:41 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"json","value":{"name":"test","tags":["a","b","c"],"value":4}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '229' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '230' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-25.yml b/tests/test_playbooks/fixtures/global_parameter-25.yml index 865224ba35..a0e7500f93 100644 --- a/tests/test_playbooks/fixtures/global_parameter-25.yml +++ b/tests/test_playbooks/fixtures/global_parameter-25.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,18 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:39 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"json\",\"value\":{\"name\":\"test\",\"tags\":[\"a\"\ - ,\"b\",\"c\"],\"value\":4}}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:41 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"json\",\"value\":{\"name\":\"test\",\"tags\":[\"a\",\"b\",\"c\"],\"value\":4}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '404' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -112,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '405' status: code: 200 message: OK @@ -131,15 +124,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"id":11,"name":"TheAnswer","value":{"name":"test","tags":["a","b","c"],"value":4},"reference_id":null,"created_at":"2020-10-16T13:53:30.174Z","updated_at":"2020-10-16T13:53:39.910Z","priority":0,"hidden_value":"*****","key_type":"json","searchable_value":"{\"name\":\"test\",\"tags\":[\"a\",\"b\",\"c\"],\"value\":4}"}' + string: '{"id":9,"name":"TheAnswer","value":{"name":"test","tags":["a","b","c"],"value":4},"reference_id":null,"created_at":"2023-08-24T07:13:28.928Z","updated_at":"2023-08-24T07:13:41.209Z","priority":0,"hidden_value":"*****","key_type":"json","searchable_value":"{\"name\":\"test\",\"tags\":[\"a\",\"b\",\"c\"],\"value\":4}"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '318' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +163,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '319' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-26.yml b/tests/test_playbooks/fixtures/global_parameter-26.yml index 5fa75a69d5..8f933efdeb 100644 --- a/tests/test_playbooks/fixtures/global_parameter-26.yml +++ b/tests/test_playbooks/fixtures/global_parameter-26.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '175' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '175' status: code: 200 message: OK @@ -133,13 +129,15 @@ interactions: uri: https://foreman.example.org/api/common_parameters response: body: - string: '{"created_at":"2020-10-16 13:53:41 UTC","updated_at":"2020-10-16 13:53:41 - UTC","hidden_value?":false,"hidden_value":"*****","id":13,"name":"TheAnswer","parameter_type":"json","value":{"name":"test","tags":["a","b","c"],"value":4}}' + string: '{"created_at":"2023-08-24 07:13:42 UTC","updated_at":"2023-08-24 07:13:42 + UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"json","value":{"name":"test","tags":["a","b","c"],"value":4}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '230' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/global_parameter-27.yml b/tests/test_playbooks/fixtures/global_parameter-27.yml index 553ec8b433..607ecedea1 100644 --- a/tests/test_playbooks/fixtures/global_parameter-27.yml +++ b/tests/test_playbooks/fixtures/global_parameter-27.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,18 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:41 UTC\",\"updated_at\":\"2020-10-16 13:53:41 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":13,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"json\",\"value\":{\"name\":\"test\",\"tags\":[\"a\"\ - ,\"b\",\"c\"],\"value\":4}}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:42 UTC\",\"updated_at\":\"2023-08-24 07:13:42 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\",\"parameter_type\":\"json\",\"value\":{\"name\":\"test\",\"tags\":[\"a\",\"b\",\"c\"],\"value\":4}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '405' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -112,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '405' status: code: 200 message: OK @@ -131,15 +124,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/common_parameters/13 + uri: https://foreman.example.org/api/common_parameters/11 response: body: - string: '{"id":13,"name":"TheAnswer","value":{"name":"test","tags":["a","b","c"],"value":4},"reference_id":null,"created_at":"2020-10-16T13:53:41.158Z","updated_at":"2020-10-16T13:53:41.158Z","priority":0,"hidden_value":"*****","key_type":"json","searchable_value":"{\"name\":\"test\",\"tags\":[\"a\",\"b\",\"c\"],\"value\":4}"}' + string: '{"id":11,"name":"TheAnswer","value":{"name":"test","tags":["a","b","c"],"value":4},"reference_id":null,"created_at":"2023-08-24T07:13:42.773Z","updated_at":"2023-08-24T07:13:42.773Z","priority":0,"hidden_value":"*****","key_type":"json","searchable_value":"{\"name\":\"test\",\"tags\":[\"a\",\"b\",\"c\"],\"value\":4}"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '319' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +163,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '319' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-3.yml b/tests/test_playbooks/fixtures/global_parameter-3.yml index b4cf6d914a..243c23509f 100644 --- a/tests/test_playbooks/fixtures/global_parameter-3.yml +++ b/tests/test_playbooks/fixtures/global_parameter-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22my_param%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"my_param\\\"\",\n \"sort\": {\n \ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:30 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":12,\"name\":\"my_param\"\ - ,\"parameter_type\":\"string\",\"value\":42}]\n}\n" + string: "{\n \"total\": 6,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"my_param\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:29 UTC\",\"updated_at\":\"2023-08-24 07:13:29 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":10,\"name\":\"my_param\",\"parameter_type\":\"string\",\"value\":\"42\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '363' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '361' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/12?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/10?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:30 - UTC","hidden_value?":false,"hidden_value":"*****","id":12,"name":"my_param","parameter_type":"string","value":42}' + string: '{"created_at":"2023-08-24 07:13:29 UTC","updated_at":"2023-08-24 07:13:29 + UTC","hidden_value?":false,"hidden_value":"*****","id":10,"name":"my_param","parameter_type":"string","value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '189' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '187' status: code: 200 message: OK @@ -189,16 +181,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/12 + uri: https://foreman.example.org/api/common_parameters/10 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:31 - UTC","hidden_value?":false,"hidden_value":"*****","id":12,"name":"my_param2","parameter_type":"string","value":42}' + string: '{"created_at":"2023-08-24 07:13:29 UTC","updated_at":"2023-08-24 07:13:30 + UTC","hidden_value?":false,"hidden_value":"*****","id":10,"name":"my_param2","parameter_type":"string","value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '190' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -212,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -229,8 +221,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-4.yml b/tests/test_playbooks/fixtures/global_parameter-4.yml index af32321e7c..ea30eb2c66 100644 --- a/tests/test_playbooks/fixtures/global_parameter-4.yml +++ b/tests/test_playbooks/fixtures/global_parameter-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22my_param2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"my_param2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:31 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":12,\"name\":\"my_param2\"\ - ,\"parameter_type\":\"string\",\"value\":42}]\n}\n" + string: "{\n \"total\": 6,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"my_param2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:29 UTC\",\"updated_at\":\"2023-08-24 07:13:30 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":10,\"name\":\"my_param2\",\"parameter_type\":\"string\",\"value\":\"42\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '365' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/12?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/10?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:31 - UTC","hidden_value?":false,"hidden_value":"*****","id":12,"name":"my_param2","parameter_type":"string","value":42}' + string: '{"created_at":"2023-08-24 07:13:29 UTC","updated_at":"2023-08-24 07:13:30 + UTC","hidden_value?":false,"hidden_value":"*****","id":10,"name":"my_param2","parameter_type":"string","value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '190' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-5.yml b/tests/test_playbooks/fixtures/global_parameter-5.yml index 063b10034a..dffc4f5109 100644 --- a/tests/test_playbooks/fixtures/global_parameter-5.yml +++ b/tests/test_playbooks/fixtures/global_parameter-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22my_param2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"my_param2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:31 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":12,\"name\":\"my_param2\"\ - ,\"parameter_type\":\"string\",\"value\":42}]\n}\n" + string: "{\n \"total\": 6,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"my_param2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:29 UTC\",\"updated_at\":\"2023-08-24 07:13:30 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":10,\"name\":\"my_param2\",\"parameter_type\":\"string\",\"value\":\"42\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '365' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -130,15 +124,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/common_parameters/12 + uri: https://foreman.example.org/api/common_parameters/10 response: body: - string: '{"id":12,"name":"my_param2","value":42,"reference_id":null,"created_at":"2020-10-16T13:53:30.999Z","updated_at":"2020-10-16T13:53:31.432Z","priority":0,"hidden_value":"*****","key_type":"string","searchable_value":"42"}' + string: '{"id":10,"name":"my_param2","value":"42","reference_id":null,"created_at":"2023-08-24T07:13:29.949Z","updated_at":"2023-08-24T07:13:30.492Z","priority":0,"hidden_value":"*****","key_type":"string","searchable_value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '221' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +163,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '219' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-6.yml b/tests/test_playbooks/fixtures/global_parameter-6.yml index fd031e9eaa..67c7ae16bf 100644 --- a/tests/test_playbooks/fixtures/global_parameter-6.yml +++ b/tests/test_playbooks/fixtures/global_parameter-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:30 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"string\",\"value\":42}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:28 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"string\",\"value\":\"42\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '364' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:30 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"string","value":42}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:28 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"string","value":"42"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '189' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,14 +162,11 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK - request: - body: '{"common_parameter": {"value": "42", "parameter_type": "integer", "hidden_value": - true}}' + body: '{"common_parameter": {"parameter_type": "integer", "hidden_value": true}}' headers: Accept: - application/json;version=2 @@ -184,22 +175,24 @@ interactions: Connection: - keep-alive Content-Length: - - '88' + - '73' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:32 - UTC","hidden_value?":true,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"integer","value":"*****"}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:32 + UTC","hidden_value?":true,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"integer","value":"*****"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '192' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +221,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '193' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-7.yml b/tests/test_playbooks/fixtures/global_parameter-7.yml index a40bf5dc99..7c65c17a00 100644 --- a/tests/test_playbooks/fixtures/global_parameter-7.yml +++ b/tests/test_playbooks/fixtures/global_parameter-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:32 UTC\",\"\ - hidden_value?\":true,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"integer\",\"value\":42}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:32 UTC\",\"hidden_value?\":true,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"integer\",\"value\":42}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:32 - UTC","hidden_value?":true,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"integer","value":42}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:32 + UTC","hidden_value?":true,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"integer","value":42}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-8.yml b/tests/test_playbooks/fixtures/global_parameter-8.yml index ae06551642..8e3d5a053d 100644 --- a/tests/test_playbooks/fixtures/global_parameter-8.yml +++ b/tests/test_playbooks/fixtures/global_parameter-8.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:32 UTC\",\"\ - hidden_value?\":true,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"integer\",\"value\":42}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:32 UTC\",\"hidden_value?\":true,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"integer\",\"value\":42}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '363' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:32 - UTC","hidden_value?":true,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"integer","value":42}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:32 + UTC","hidden_value?":true,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"integer","value":42}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK @@ -189,16 +181,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:33 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"integer","value":42}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:33 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"integer","value":42}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '188' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -212,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -229,8 +221,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '189' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/global_parameter-9.yml b/tests/test_playbooks/fixtures/global_parameter-9.yml index 2d50a7de23..06f2559bf0 100644 --- a/tests/test_playbooks/fixtures/global_parameter-9.yml +++ b/tests/test_playbooks/fixtures/global_parameter-9.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '66' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/common_parameters?show_hidden=true&search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\"\ - :\"2020-10-16 13:53:30 UTC\",\"updated_at\":\"2020-10-16 13:53:33 UTC\",\"\ - hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":11,\"name\":\"TheAnswer\"\ - ,\"parameter_type\":\"integer\",\"value\":42}]\n}\n" + string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"TheAnswer\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2023-08-24 + 07:13:28 UTC\",\"updated_at\":\"2023-08-24 07:13:33 UTC\",\"hidden_value?\":false,\"hidden_value\":\"*****\",\"id\":9,\"name\":\"TheAnswer\",\"parameter_type\":\"integer\",\"value\":42}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '363' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '364' status: code: 200 message: OK @@ -128,16 +122,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/common_parameters/11?show_hidden=true + uri: https://foreman.example.org/api/common_parameters/9?show_hidden=true response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:33 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"integer","value":42}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:33 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"integer","value":42}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '188' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '189' status: code: 200 message: OK @@ -189,16 +181,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/common_parameters/11 + uri: https://foreman.example.org/api/common_parameters/9 response: body: - string: '{"created_at":"2020-10-16 13:53:30 UTC","updated_at":"2020-10-16 13:53:33 - UTC","hidden_value?":false,"hidden_value":"*****","id":11,"name":"TheAnswer","parameter_type":"real","value":3.14}' + string: '{"created_at":"2023-08-24 07:13:28 UTC","updated_at":"2023-08-24 07:13:33 + UTC","hidden_value?":false,"hidden_value":"*****","id":9,"name":"TheAnswer","parameter_type":"real","value":3.14}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -212,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0-rc3 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -229,8 +221,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '188' status: code: 200 message: OK diff --git a/tests/test_playbooks/global_parameter.yml b/tests/test_playbooks/global_parameter.yml index 457483981b..ba5c2f7900 100644 --- a/tests/test_playbooks/global_parameter.yml +++ b/tests/test_playbooks/global_parameter.yml @@ -43,16 +43,19 @@ - include_tasks: tasks/global_parameter.yml vars: global_parameter_type: integer + global_parameter_value: 42 global_parameter_hidden_value: true expected_change: true - include_tasks: tasks/global_parameter.yml vars: global_parameter_type: integer + global_parameter_value: 42 global_parameter_hidden_value: true expected_change: false - include_tasks: tasks/global_parameter.yml vars: global_parameter_type: integer + global_parameter_value: 42 global_parameter_hidden_value: false expected_change: true - include_tasks: tasks/global_parameter.yml diff --git a/tests/test_playbooks/tasks/global_parameter.yml b/tests/test_playbooks/tasks/global_parameter.yml index c906016274..84a4f7c74e 100644 --- a/tests/test_playbooks/tasks/global_parameter.yml +++ b/tests/test_playbooks/tasks/global_parameter.yml @@ -1,7 +1,7 @@ --- - vars: global_parameter_name: "TheAnswer" - global_parameter_value: 42 + global_parameter_value: "42" global_parameter_state: present block: - name: "Ensure Global Parameter '{{ global_parameter_name }}' is {{ global_parameter_state }}"