diff --git a/changelogs/fragments/activation_key-cv_environments.yml b/changelogs/fragments/activation_key-cv_environments.yml new file mode 100644 index 0000000000..68adc50fcb --- /dev/null +++ b/changelogs/fragments/activation_key-cv_environments.yml @@ -0,0 +1,2 @@ +minor_changes: + - activation_key - add ``content_view_environments`` parameter to support multi CV (https://github.com/theforeman/foreman-ansible-modules/pull/1935) diff --git a/plugins/modules/activation_key.py b/plugins/modules/activation_key.py index 414554a51a..824e1e635d 100644 --- a/plugins/modules/activation_key.py +++ b/plugins/modules/activation_key.py @@ -45,6 +45,13 @@ description: - Name of the content view type: str + content_view_environments: + description: + - List of content view environments to add to activation key. + - Mutually exclusive with C(content_view) and C(lifecycle_environment). + type: list + elements: str + version_added: 5.8.0 subscriptions: description: - List of subscriptions that include either Name, Pool ID, or Upstream Pool ID. @@ -183,6 +190,24 @@ auto_attach: false release_version: 7Server service_level: Standard + +- name: "Create client activation key with multiple content views" + theforeman.foreman.activation_key: + username: "admin" + password: "changeme" + server_url: "https://foreman.example.com" + name: "Clients" + organization: "Default Organization" + content_view_environments: + - prod/base_rhel_9 + - test/third_party + host_collections: + - rhel9-servers + - rhel9-production + - rhel9-third-party-test + auto_attach: false + release_version: 9 + service_level: Standard ''' RETURN = ''' @@ -227,6 +252,7 @@ def main(): description=dict(), lifecycle_environment=dict(type='entity', flat_name='environment_id', scope=['organization']), content_view=dict(type='entity', scope=['organization']), + content_view_environments=dict(type='list', elements='str'), host_collections=dict(type='entity_list', scope=['organization']), auto_attach=dict(type='bool'), release_version=dict(), @@ -237,6 +263,10 @@ def main(): purpose_role=dict(), purpose_addons=dict(type='list', elements='str'), ), + mutually_exclusive=[ + ['lifecycle_environment', 'content_view_environments'], + ['content_view', 'content_view_environments'] + ], argument_spec=dict( subscriptions=dict(type='list', elements='dict', options=dict( name=dict(), @@ -273,6 +303,20 @@ def main(): if not module.desired_absent: module.lookup_entity('host_collections') host_collections = module.foreman_params.pop('host_collections', None) + + content_view_environments = module.foreman_params.pop('content_view_environments', None) + content_view = module.foreman_params.get("content_view") + lifecycle_environment = module.foreman_params.get("lifecycle_environment") + # only use content view environments if content view and lifecycle environment are not specified + if content_view_environments is not None and content_view is None and lifecycle_environment is None: + desired_content_view_environments = set(content_view_environments) + if not entity: + current_content_view_environments = set() + else: + current_content_view_environments = set(entity.get('content_view_environment_labels', '').split(",")) + if desired_content_view_environments != current_content_view_environments: + module.foreman_params["content_view_environments"] = sorted(list(desired_content_view_environments)) + activation_key = module.run() # only update subscriptions of newly created or updated AKs diff --git a/roles/activation_keys/tasks/main.yml b/roles/activation_keys/tasks/main.yml index 01e90ee46f..06fd721486 100644 --- a/roles/activation_keys/tasks/main.yml +++ b/roles/activation_keys/tasks/main.yml @@ -8,8 +8,9 @@ organization: "{{ item.organization | default(foreman_organization) }}" name: "{{ item.name }}" description: "{{ item.description | default(omit) }}" - lifecycle_environment: "{{ item.lifecycle_environment | default('Library') }}" - content_view: "{{ item.content_view | default('Default Organization View') }}" + lifecycle_environment: "{{ item.lifecycle_environment | default(omit) if (item.content_view_environments | default([]) | length > 0) else item.lifecycle_environment | default('Library') }}" + content_view: "{{ item.content_view | default(omit) if (item.content_view_environments | default([]) | length > 0) else item.content_view | default('Default Organization View') }}" + content_view_environments: "{{ item.content_view_environments | default(omit) }}" host_collections: "{{ item.host_collections | default(omit) }}" subscriptions: "{{ item.subscriptions | default(omit) }}" content_overrides: "{{ item.content_overrides | default(omit) }}" diff --git a/tests/test_playbooks/activation_key.yml b/tests/test_playbooks/activation_key.yml index 8df1661fb9..96607f60e8 100644 --- a/tests/test_playbooks/activation_key.yml +++ b/tests/test_playbooks/activation_key.yml @@ -27,6 +27,37 @@ vars: activation_key_state: absent activation_key_name: Test Activation Key Copy + - include_tasks: tasks/lifecycle_environment.yml + vars: + lifecycle_environment_state: present + lifecycle_environment_name: "{{ item.name }}" + lifecycle_environment_label: "{{ item.label }}" + lifecycle_environment_prior: "{{ item.prior }}" + loop: + - name: Dev + prior: Library + - name: Test + prior: Dev + - name: Prod + prior: Test + - include_tasks: tasks/content_view.yml + vars: + content_view_name: "{{ item }}" + loop: + - Test Content View 1 + - Test Content View 2 + - Test Content View 3 + - include_tasks: tasks/content_view_version.yml + vars: + content_view_name: "{{ item }}" + lifecycle_environments: + - Dev + - Test + - Prod + loop: + - Test Content View 1 + - Test Content View 2 + - Test Content View 3 - hosts: tests collections: @@ -250,6 +281,102 @@ activation_key_state: absent expected_change: false + - name: create AK with multiple CVs + include_tasks: tasks/activation_key.yml + vars: + activation_key_name: "Test Activation Key with multiple CVs" + activation_key_content_view_environments: + - "Dev/Test_Content_View_1" + - "Test/Test_Content_View_2" + expected_change: true + expected_diff: true + expected_diff_before: "{}" + # Dev/Test_Content_View_1 must appear + # Test/Test_Content_View_2 must appear + # Default Organization View must NOT appear + expected_diff_after: '^(?=.*Dev/Test_Content_View_1)(?=.*Test/Test_Content_View_2)(?!.*Default Organization View).*' + - name: swap content-view-environments, nothing should happen + include_tasks: tasks/activation_key.yml + vars: + activation_key_name: "Test Activation Key with multiple CVs" + activation_key_content_view_environments: + - "Test/Test_Content_View_2" + - "Dev/Test_Content_View_1" + expected_change: false + - name: add another content-view-environment + include_tasks: tasks/activation_key.yml + vars: + activation_key_name: "Test Activation Key with multiple CVs" + activation_key_content_view_environments: + - "Dev/Test_Content_View_1" + - "Test/Test_Content_View_2" + - "Prod/Test_Content_View_3" + expected_change: true + expected_diff: true + # Dev/Test_Content_View_1 must appear + # Test/Test_Content_View_2 must appear + # Default Organization View must NOT appear + expected_diff_before: '^(?=.*Dev/Test_Content_View_1)(?=.*Test/Test_Content_View_2)(?!.*Default Organization View).*' + # Dev/Test_Content_View_1 must appear + # Test/Test_Content_View_2 must appear + # Prod/Test_Content_View_3 must appear + # Default Organization View must NOT appear + expected_diff_after: '^(?=.*Dev/Test_Content_View_1)(?=.*Test/Test_Content_View_2)(?=.*Prod/Test_Content_View_3)(?!.*Default Organization View).*' + - name: remove AK with multiple CVs + include_tasks: tasks/activation_key.yml + vars: + activation_key_name: "Test Activation Key with multiple CVs" + activation_key_state: absent + expected_change: true + + - name: create AK with multiple CVs + include_tasks: tasks/activation_key.yml + vars: + activation_key_content_view_environments: + - "Dev/Test_Content_View_1" + - "Test/Test_Content_View_2" + expected_change: true + expected_diff: true + expected_diff_before: "{}" + # Dev/Test_Content_View_1 must appear + # Test/Test_Content_View_2 must appear + # Default Organization View must NOT appear + expected_diff_after: "^(?=.*Dev/Test_Content_View_1)(?=.*Test/Test_Content_View_2)(?!.*Default Organization View).*" + - name: change AK to single CV mode + include_tasks: tasks/activation_key.yml + vars: + activation_key_content_view: "Default Organization View" + activation_key_lifecycle_environment: Library + expected_change: true + # Dev/Test_Content_View_1 must appear + # Test/Test_Content_View_2 must appear + # Default Organization View must NOT appear + expected_diff_before: "^(?=.*Dev/Test_Content_View_1)(?=.*Test/Test_Content_View_2)(?!.*Default Organization View).*" + # Dev/Test_Content_View_1 must NOT appear + # Test/Test_Content_View_2 must NOT appear + # Default Organization View must appear + expected_diff_after: "^(?!.*(Dev/Test_Content_View_1|Test/Test_Content_View_2))(?=.*Default Organization View).*" + - name: change AK back to multiple CV mode + include_tasks: tasks/activation_key.yml + vars: + activation_key_content_view_environments: + - "Dev/Test_Content_View_1" + - "Test/Test_Content_View_2" + expected_change: true + # Dev/Test_Content_View_1 must NOT appear + # Test/Test_Content_View_2 must NOT appear + # Default Organization View must appear + expected_diff_before: "^(?!.*(Dev/Test_Content_View_1|Test/Test_Content_View_2))(?=.*Default Organization View).*" + # Dev/Test_Content_View_1 must appear + # Test/Test_Content_View_2 must appear + # Default Organization View must NOT appear + expected_diff_after: "^(?=.*Dev/Test_Content_View_1)(?=.*Test/Test_Content_View_2)(?!.*Default Organization View).*" + - name: remove AK + include_tasks: tasks/activation_key.yml + vars: + activation_key_state: absent + expected_change: true + - hosts: localhost collections: - theforeman.foreman @@ -265,6 +392,30 @@ - include_tasks: tasks/product.yml vars: product_state: absent + - include_tasks: tasks/lifecycle_environment.yml + vars: + lifecycle_environment_state: absent + lifecycle_environment_name: "{{ item }}" + loop: + - Test + - Dev + - include_tasks: tasks/content_view_version.yml + vars: + state: absent + content_view_name: "{{ item }}" + lifecycle_environments: + - Dev + - Test + loop: + - Test Content View 1 + - Test Content View 2 + - include_tasks: tasks/content_view.yml + vars: + content_view_state: absent + content_view_name: "{{ item }}" + loop: + - Test Content View 1 + - Test Content View 2 - include_tasks: tasks/organization.yml vars: organization_state: absent diff --git a/tests/test_playbooks/fixtures/activation_key-0.yml b/tests/test_playbooks/fixtures/activation_key-0.yml index 7b7566222d..78cc8b8f2f 100644 --- a/tests/test_playbooks/fixtures/activation_key-0.yml +++ b/tests/test_playbooks/fixtures/activation_key-0.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,28 +148,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key"}' + body: '{"name": "Test Activation Key", "organization_id": 69}' headers: Accept: - application/json;version=2 @@ -178,7 +184,7 @@ interactions: Connection: - keep-alive Content-Length: - - '53' + - '54' Content-Type: - application/json User-Agent: @@ -187,10 +193,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":16,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:42 UTC","updated_at":"2024-04-15 16:24:42 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":781,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -199,11 +205,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,23 +213,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_key-1.yml b/tests/test_playbooks/fixtures/activation_key-1.yml index 766e3b070f..11bbcac5a2 100644 --- a/tests/test_playbooks/fixtures/activation_key-1.yml +++ b/tests/test_playbooks/fixtures/activation_key-1.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":16,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:42 UTC","updated_at":"2024-04-15 16:24:42 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":781,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/16?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/781?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":16,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:42 UTC","updated_at":"2024-04-15 16:24:42 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":781,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-10.yml b/tests/test_playbooks/fixtures/activation_key-10.yml index 465a744a9b..4286334dff 100644 --- a/tests/test_playbooks/fixtures/activation_key-10.yml +++ b/tests/test_playbooks/fixtures/activation_key-10.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,14 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,11 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1193' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,23 +216,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -244,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":2,"name":"Test - Product"},"content":{"id":2,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1713198278632","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test + Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} ' headers: @@ -259,10 +269,6 @@ interactions: - Keep-Alive Content-Length: - '761' - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -272,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -307,14 +319,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/18/content_override + uri: https://foreman.example.org/katello/api/activation_keys/783/content_override response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -323,11 +336,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '824' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1288' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -337,21 +346,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-11.yml b/tests/test_playbooks/fixtures/activation_key-11.yml index c104e1659b..34343d90b8 100644 --- a/tests/test_playbooks/fixtures/activation_key-11.yml +++ b/tests/test_playbooks/fixtures/activation_key-11.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,14 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,11 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '824' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1288' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,23 +216,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -244,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":2,"name":"Test - Product"},"content":{"id":2,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1713198278632","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"1","overrides":[{"name":"enabled","value":true}],"enabled_content_override":true,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test + Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"1","overrides":[{"name":"enabled","value":true}],"enabled_content_override":true,"redhat":false}]} ' headers: @@ -259,10 +269,6 @@ interactions: - Keep-Alive Content-Length: - '786' - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -272,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-12.yml b/tests/test_playbooks/fixtures/activation_key-12.yml index 4b3caebdd3..8c2a7a1f0c 100644 --- a/tests/test_playbooks/fixtures/activation_key-12.yml +++ b/tests/test_playbooks/fixtures/activation_key-12.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -186,18 +193,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/18 + uri: https://foreman.example.org/katello/api/activation_keys/783 response: body: - string: ' {"id":"76bb7ccc-5091-4f1c-846c-102b8a24b21f","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"f3d75a8d-152d-4c9a-a473-c5388410a1fc","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:24:57 UTC","ended_at":"2024-04-15 - 16:24:57 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":18,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"b7d7f675-8a9f-4f3e-9cc7-9ed3213788d9","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:39 UTC","ended_at":"2025-12-08 + 10:28:39 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":783,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"481a8cfc-0d20-4e05-a200-2b53e2013cc8","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/18/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:24:57 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/783/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:39 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -205,10 +212,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -218,23 +221,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-13.yml b/tests/test_playbooks/fixtures/activation_key-13.yml index 6e800d383b..b190d2977a 100644 --- a/tests/test_playbooks/fixtures/activation_key-13.yml +++ b/tests/test_playbooks/fixtures/activation_key-13.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,28 +148,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key", "auto_attach": true}' + body: '{"name": "Test Activation Key", "organization_id": 69, "auto_attach": true}' headers: Accept: - application/json;version=2 @@ -178,7 +184,7 @@ interactions: Connection: - keep-alive Content-Length: - - '74' + - '75' Content-Type: - application/json User-Agent: @@ -187,10 +193,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":19,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:58 UTC","updated_at":"2024-04-15 16:24:58 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":784,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -199,11 +205,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,23 +213,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_key-14.yml b/tests/test_playbooks/fixtures/activation_key-14.yml index a299232dbf..c88b02f6d4 100644 --- a/tests/test_playbooks/fixtures/activation_key-14.yml +++ b/tests/test_playbooks/fixtures/activation_key-14.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":19,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:58 UTC","updated_at":"2024-04-15 16:24:58 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":784,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/19?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/784?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":19,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:58 UTC","updated_at":"2024-04-15 16:24:58 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":784,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-15.yml b/tests/test_playbooks/fixtures/activation_key-15.yml index ed256b98da..47cdc6c064 100644 --- a/tests/test_playbooks/fixtures/activation_key-15.yml +++ b/tests/test_playbooks/fixtures/activation_key-15.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":19,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:58 UTC","updated_at":"2024-04-15 16:24:58 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":784,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/19 + uri: https://foreman.example.org/katello/api/activation_keys/784 response: body: - string: ' {"id":"3d97ca80-595d-4f56-8a2d-95df0a04795c","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"f0135d61-f0e1-462e-9695-f07ceebc1d77","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:25:00 UTC","ended_at":"2024-04-15 - 16:25:00 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":19,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"39cb464c-99b0-4d84-9042-91c343ad57c1","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:42 UTC","ended_at":"2025-12-08 + 10:28:42 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":784,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"4bde7f6b-879a-4979-b70b-dfb2bea080e7","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/19/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:25:00 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/784/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:42 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -204,10 +210,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,23 +219,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-16.yml b/tests/test_playbooks/fixtures/activation_key-16.yml index e0b9cff0d5..0f2f8b3436 100644 --- a/tests/test_playbooks/fixtures/activation_key-16.yml +++ b/tests/test_playbooks/fixtures/activation_key-16.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,28 +148,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key", "auto_attach": false}' + body: '{"name": "Test Activation Key", "organization_id": 69, "auto_attach": false}' headers: Accept: - application/json;version=2 @@ -178,7 +184,7 @@ interactions: Connection: - keep-alive Content-Length: - - '75' + - '76' Content-Type: - application/json User-Agent: @@ -187,10 +193,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":20,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:01 UTC","updated_at":"2024-04-15 16:25:01 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":785,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -199,11 +205,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '676' - 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''; - style-src ''unsafe-inline'' ''self''' + - '766' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,23 +213,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_key-17.yml b/tests/test_playbooks/fixtures/activation_key-17.yml index 1d793a9755..387360cefe 100644 --- a/tests/test_playbooks/fixtures/activation_key-17.yml +++ b/tests/test_playbooks/fixtures/activation_key-17.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":20,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:01 UTC","updated_at":"2024-04-15 16:25:01 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":785,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '803' - 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''; - style-src ''unsafe-inline'' ''self''' + - '891' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/20?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/785?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":20,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:01 UTC","updated_at":"2024-04-15 16:25:01 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":785,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '676' - 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''; - style-src ''unsafe-inline'' ''self''' + - '766' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-18.yml b/tests/test_playbooks/fixtures/activation_key-18.yml index 75d5c8487e..81f4e53fb4 100644 --- a/tests/test_playbooks/fixtures/activation_key-18.yml +++ b/tests/test_playbooks/fixtures/activation_key-18.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":20,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:01 UTC","updated_at":"2024-04-15 16:25:01 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":785,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '803' - 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''; - style-src ''unsafe-inline'' ''self''' + - '891' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/20 + uri: https://foreman.example.org/katello/api/activation_keys/785 response: body: - string: ' {"id":"9d238fee-6da8-4d27-87a0-d62777fad0f8","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"a631a9ff-a939-4d6d-a302-fa90d8b53a35","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:25:03 UTC","ended_at":"2024-04-15 - 16:25:04 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":20,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"9dc5a251-0177-4909-8a05-db471e243da3","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:44 UTC","ended_at":"2025-12-08 + 10:28:45 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":785,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"69c1b9a2-e755-404d-8347-1aefb3611267","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/20/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:25:03 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/785/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:44 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -204,10 +210,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,23 +219,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-19.yml b/tests/test_playbooks/fixtures/activation_key-19.yml index 8382410900..f525d5e774 100644 --- a/tests/test_playbooks/fixtures/activation_key-19.yml +++ b/tests/test_playbooks/fixtures/activation_key-19.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,28 +148,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key", "max_hosts": 10, + body: '{"name": "Test Activation Key", "organization_id": 69, "max_hosts": 10, "unlimited_hosts": false}' headers: Accept: @@ -179,7 +185,7 @@ interactions: Connection: - keep-alive Content-Length: - - '96' + - '97' Content-Type: - application/json User-Agent: @@ -188,10 +194,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":21,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:05 UTC","updated_at":"2024-04-15 16:25:05 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":786,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,11 +206,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '674' - 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''; - style-src ''unsafe-inline'' ''self''' + - '764' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,23 +214,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_key-2.yml b/tests/test_playbooks/fixtures/activation_key-2.yml index 42ae5ae25a..fbfd47e500 100644 --- a/tests/test_playbooks/fixtures/activation_key-2.yml +++ b/tests/test_playbooks/fixtures/activation_key-2.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":16,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:42 UTC","updated_at":"2024-04-15 16:24:42 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":781,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/16 + uri: https://foreman.example.org/katello/api/activation_keys/781 response: body: - string: ' {"id":"8a2d90cf-2339-4a8d-ab86-9364b7d76ce3","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"30f97794-7196-45c9-ac4c-153091e9374e","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:24:44 UTC","ended_at":"2024-04-15 - 16:24:44 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":16,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"8d3257cc-cdd7-4fb2-9823-ae3c65b0549e","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:28 UTC","ended_at":"2025-12-08 + 10:28:29 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":781,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"a14aa40c-194c-44f7-abe8-f4b261143a9d","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/16/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:24:44 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/781/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:28 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -204,10 +210,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,23 +219,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-20.yml b/tests/test_playbooks/fixtures/activation_key-20.yml index b3f23c07a4..f69d0c620d 100644 --- a/tests/test_playbooks/fixtures/activation_key-20.yml +++ b/tests/test_playbooks/fixtures/activation_key-20.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:05 UTC","updated_at":"2024-04-15 16:25:05 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":786,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '801' - 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''; - style-src ''unsafe-inline'' ''self''' + - '889' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/21?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/786?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":21,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:05 UTC","updated_at":"2024-04-15 16:25:05 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":786,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '674' - 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''; - style-src ''unsafe-inline'' ''self''' + - '764' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-21.yml b/tests/test_playbooks/fixtures/activation_key-21.yml index 9873939e64..b887e935dd 100644 --- a/tests/test_playbooks/fixtures/activation_key-21.yml +++ b/tests/test_playbooks/fixtures/activation_key-21.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:05 UTC","updated_at":"2024-04-15 16:25:05 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":786,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '801' - 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''; - style-src ''unsafe-inline'' ''self''' + - '889' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/21 + uri: https://foreman.example.org/katello/api/activation_keys/786 response: body: - string: ' {"id":"dad7139b-2f38-49f3-80d3-f3b4309752a7","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"0cba66d1-fc4f-4234-9f80-b539cf8918a1","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:25:07 UTC","ended_at":"2024-04-15 - 16:25:07 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":21,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"c7cd26e7-b22a-480f-bda7-dc8812de8b03","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:47 UTC","ended_at":"2025-12-08 + 10:28:48 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":786,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"1cae3d4d-ea59-4a0a-bae6-6f6afe090882","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/21/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:25:07 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/786/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:47 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -204,10 +210,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,23 +219,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-22.yml b/tests/test_playbooks/fixtures/activation_key-22.yml index f6a45fb19e..1393adc113 100644 --- a/tests/test_playbooks/fixtures/activation_key-22.yml +++ b/tests/test_playbooks/fixtures/activation_key-22.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -180,12 +186,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":4,"max_hosts":null,"description":"Foo - host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2024-04-15 - 16:24:40 UTC","updated_at":"2024-04-15 16:24:40 UTC","id":2,"permissions":{"deletable":true,"editable":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":69,"max_hosts":null,"description":"Foo + host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2025-12-08 + 10:27:49 UTC","updated_at":"2025-12-08 10:27:49 UTC","id":51,"permissions":{"deletable":true,"editable":true}}]} ' headers: @@ -195,10 +201,6 @@ interactions: - Keep-Alive Content-Length: - '446' - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -206,28 +208,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key"}' + body: '{"name": "Test Activation Key", "organization_id": 69}' headers: Accept: - application/json;version=2 @@ -236,7 +244,7 @@ interactions: Connection: - keep-alive Content-Length: - - '53' + - '54' Content-Type: - application/json User-Agent: @@ -245,10 +253,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -257,11 +265,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -269,28 +273,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created - request: - body: '{"host_collection_ids": [2]}' + body: '{"host_collection_ids": [51]}' headers: Accept: - application/json;version=2 @@ -299,19 +309,19 @@ interactions: Connection: - keep-alive Content-Length: - - '28' + - '29' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/activation_keys/22/host_collections + uri: https://foreman.example.org/katello/api/activation_keys/787/host_collections response: body: - string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -320,11 +330,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '702' - 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''; - style-src ''unsafe-inline'' ''self''' + - '793' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -334,21 +340,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-23.yml b/tests/test_playbooks/fixtures/activation_key-23.yml index 7f686aa135..9e461dc5dd 100644 --- a/tests/test_playbooks/fixtures/activation_key-23.yml +++ b/tests/test_playbooks/fixtures/activation_key-23.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '829' - 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''; - style-src ''unsafe-inline'' ''self''' + - '918' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/22?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/787?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '702' - 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''; - style-src ''unsafe-inline'' ''self''' + - '793' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -242,12 +250,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":4,"max_hosts":null,"description":"Foo - host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2024-04-15 - 16:24:40 UTC","updated_at":"2024-04-15 16:24:40 UTC","id":2,"permissions":{"deletable":true,"editable":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":69,"max_hosts":null,"description":"Foo + host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2025-12-08 + 10:27:49 UTC","updated_at":"2025-12-08 10:27:49 UTC","id":51,"permissions":{"deletable":true,"editable":true}}]} ' headers: @@ -257,10 +265,6 @@ interactions: - Keep-Alive Content-Length: - '446' - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -268,23 +272,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-24.yml b/tests/test_playbooks/fixtures/activation_key-24.yml index 619ad30763..c92f06af3a 100644 --- a/tests/test_playbooks/fixtures/activation_key-24.yml +++ b/tests/test_playbooks/fixtures/activation_key-24.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '829' - 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''; - style-src ''unsafe-inline'' ''self''' + - '918' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/22?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/787?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '702' - 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''; - style-src ''unsafe-inline'' ''self''' + - '793' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,28 +212,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"host_collection_ids": [2]}' + body: '{"host_collection_ids": [51]}' headers: Accept: - application/json;version=2 @@ -240,19 +248,19 @@ interactions: Connection: - keep-alive Content-Length: - - '28' + - '29' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/22/host_collections + uri: https://foreman.example.org/katello/api/activation_keys/787/host_collections response: body: - string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -261,11 +269,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -275,21 +279,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-25.yml b/tests/test_playbooks/fixtures/activation_key-25.yml index 9431f0d83b..fc198186f1 100644 --- a/tests/test_playbooks/fixtures/activation_key-25.yml +++ b/tests/test_playbooks/fixtures/activation_key-25.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":22,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:08 UTC","updated_at":"2024-04-15 16:25:08 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":787,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/22 + uri: https://foreman.example.org/katello/api/activation_keys/787 response: body: - string: ' {"id":"067be16b-1f93-4ab1-b574-014cd74849ec","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"41fc65b7-9005-48df-99c7-aa524ba91f19","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:25:12 UTC","ended_at":"2024-04-15 - 16:25:12 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":22,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"82bc132b-3d4b-45bb-888b-c1a9fa190b00","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:51 UTC","ended_at":"2025-12-08 + 10:28:51 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":787,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"8b8bace9-61bd-4f28-9f9b-1be8f3ba328f","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/22/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:25:12 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/787/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:51 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -204,10 +210,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,23 +219,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-26.yml b/tests/test_playbooks/fixtures/activation_key-26.yml index 510d2b51ff..08dac6bff6 100644 --- a/tests/test_playbooks/fixtures/activation_key-26.yml +++ b/tests/test_playbooks/fixtures/activation_key-26.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,28 +148,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key"}' + body: '{"name": "Test Activation Key", "organization_id": 69}' headers: Accept: - application/json;version=2 @@ -178,7 +184,7 @@ interactions: Connection: - keep-alive Content-Length: - - '53' + - '54' Content-Type: - application/json User-Agent: @@ -187,10 +193,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -199,11 +205,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,23 +213,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_key-27.yml b/tests/test_playbooks/fixtures/activation_key-27.yml index 6dbb79195e..4e0062dbbc 100644 --- a/tests/test_playbooks/fixtures/activation_key-27.yml +++ b/tests/test_playbooks/fixtures/activation_key-27.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/23?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/788?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -242,12 +250,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test + Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} ' headers: @@ -256,11 +266,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1001' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1291' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -268,23 +274,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -300,17 +312,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":3,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"repository_ids":[],"id":3,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":3,"version":"1.0","published":"2024-04-15 - 16:24:34 UTC","description":null,"environment_ids":[3],"filters_applied":null,"published_at_words":"1 - minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2024-04-15 - 16:24:34 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 + 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 + 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -319,11 +331,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1334' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1384' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +339,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-28.yml b/tests/test_playbooks/fixtures/activation_key-28.yml index f6ad86cb16..54e2538469 100644 --- a/tests/test_playbooks/fixtures/activation_key-28.yml +++ b/tests/test_playbooks/fixtures/activation_key-28.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/23?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/788?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -242,10 +250,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -255,11 +263,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '179' - 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''; - style-src ''unsafe-inline'' ''self''' + - '177' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -267,28 +271,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"new_name": "Test Activation Key Copy", "organization_id": 4}' + body: '{"new_name": "Test Activation Key Copy", "organization_id": 69}' headers: Accept: - application/json;version=2 @@ -297,19 +307,19 @@ interactions: Connection: - keep-alive Content-Length: - - '62' + - '63' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/activation_keys/23/copy + uri: https://foreman.example.org/katello/api/activation_keys/788/copy response: body: - string: ' {"service_level":null,"content_overrides":[],"id":24,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:15 UTC","updated_at":"2024-04-15 16:25:16 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":789,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -318,11 +328,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '680' - 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''; - style-src ''unsafe-inline'' ''self''' + - '770' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -330,23 +336,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_key-29.yml b/tests/test_playbooks/fixtures/activation_key-29.yml index 01ed7f63ca..b52536dfa9 100644 --- a/tests/test_playbooks/fixtures/activation_key-29.yml +++ b/tests/test_playbooks/fixtures/activation_key-29.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/23?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/788?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -198,11 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '675' - 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''; - style-src ''unsafe-inline'' ''self''' + - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,23 +212,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -242,14 +250,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:15 UTC","updated_at":"2024-04-15 16:25:16 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":789,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -258,11 +266,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '812' - 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''; - style-src ''unsafe-inline'' ''self''' + - '900' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -270,23 +274,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -302,13 +312,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/24?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/789?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":24,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:15 UTC","updated_at":"2024-04-15 16:25:16 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":789,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -317,11 +327,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '680' - 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''; - style-src ''unsafe-inline'' ''self''' + - '770' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -329,23 +335,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-3.yml b/tests/test_playbooks/fixtures/activation_key-3.yml index 49d5a0d5b3..2ff374e60c 100644 --- a/tests/test_playbooks/fixtures/activation_key-3.yml +++ b/tests/test_playbooks/fixtures/activation_key-3.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -180,12 +186,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test + Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} ' headers: @@ -194,11 +202,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1001' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1291' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -206,23 +210,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -238,17 +248,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":3,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"repository_ids":[],"id":3,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":3,"version":"1.0","published":"2024-04-15 - 16:24:34 UTC","description":null,"environment_ids":[3],"filters_applied":null,"published_at_words":"less - than a minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2024-04-15 - 16:24:34 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 + 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 + 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -257,11 +267,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1344' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1384' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -269,29 +275,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key", "environment_id": - 3, "content_view_id": 3}' + body: '{"name": "Test Activation Key", "organization_id": 69, "content_view_id": + 163, "environment_id": 167}' headers: Accept: - application/json;version=2 @@ -300,7 +312,7 @@ interactions: Connection: - keep-alive Content-Length: - - '96' + - '101' Content-Type: - application/json User-Agent: @@ -309,11 +321,12 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":17,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:45 UTC","updated_at":"2024-04-15 16:24:46 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":782,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -322,11 +335,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1193' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -334,23 +343,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_key-30.yml b/tests/test_playbooks/fixtures/activation_key-30.yml index 9ecc0a192d..237a3dd164 100644 --- a/tests/test_playbooks/fixtures/activation_key-30.yml +++ b/tests/test_playbooks/fixtures/activation_key-30.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:15 UTC","updated_at":"2024-04-15 16:25:16 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":789,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '812' - 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''; - style-src ''unsafe-inline'' ''self''' + - '900' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/24 + uri: https://foreman.example.org/katello/api/activation_keys/789 response: body: - string: ' {"id":"38eed631-b6ae-498e-8009-805535a70cb1","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"2e6b3499-d8ec-4382-9969-25a748491769","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key Copy''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:25:18 UTC","ended_at":"2024-04-15 - 16:25:18 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":24,"name":"Test - Activation Key Copy"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"4a1cd2d7-6c50-4df6-bd0a-0c29c2715486","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:56 UTC","ended_at":"2025-12-08 + 10:28:57 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":789,"name":"Test + Activation Key Copy"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"b201fe75-68c5-48ec-8ae0-2697ccdaf63a","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key Copy''","link":"/activation_keys/24/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:25:18 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key Copy''","link":"/activation_keys/789/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:56 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -204,10 +210,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,23 +219,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-31.yml b/tests/test_playbooks/fixtures/activation_key-31.yml index 71d154fd00..c0c88fc2e5 100644 --- a/tests/test_playbooks/fixtures/activation_key-31.yml +++ b/tests/test_playbooks/fixtures/activation_key-31.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":23,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":null,"environment_id":null,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:25:13 UTC","updated_at":"2024-04-15 16:25:13 UTC","content_view":null,"environment":null,"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -139,11 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '802' - 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''; - style-src ''unsafe-inline'' ''self''' + - '890' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +151,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/23 + uri: https://foreman.example.org/katello/api/activation_keys/788 response: body: - string: ' {"id":"a0c62341-aca8-46c5-a38e-c4d94bb6eaed","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"bba02d63-57d2-4da6-a4f3-915337e313ba","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:25:19 UTC","ended_at":"2024-04-15 - 16:25:19 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":23,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"155a0517-6b2e-4f3f-b712-5efcc2b72d94","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:58 UTC","ended_at":"2025-12-08 + 10:28:58 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":788,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"8a85cc36-e1ee-497b-8643-b7d28c5662bb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/23/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:25:19 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/788/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:57 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -204,10 +210,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,23 +219,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-32.yml b/tests/test_playbooks/fixtures/activation_key-32.yml index c36ad29dda..6c9574e4c8 100644 --- a/tests/test_playbooks/fixtures/activation_key-32.yml +++ b/tests/test_playbooks/fixtures/activation_key-32.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-33.yml b/tests/test_playbooks/fixtures/activation_key-33.yml new file mode 100644 index 0000000000..f118ebe04b --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-33.yml @@ -0,0 +1,246 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 + response: + body: + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '190' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"name": "Test Activation Key with multiple CVs", "organization_id": 69, + "content_view_environments": ["Dev/Test_Content_View_1", "Test/Test_Content_View_2"]}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: POST + uri: https://foreman.example.org/katello/api/activation_keys + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1619' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-34.yml b/tests/test_playbooks/fixtures/activation_key-34.yml new file mode 100644 index 0000000000..42cac613e8 --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-34.yml @@ -0,0 +1,247 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":790,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1762' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/790?organization_id=69 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1619' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-35.yml b/tests/test_playbooks/fixtures/activation_key-35.yml new file mode 100644 index 0000000000..196c30c63f --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-35.yml @@ -0,0 +1,317 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":790,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1762' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/790?organization_id=69 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1619' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"organization_id": 69, "content_view_environments": ["Dev/Test_Content_View_1", + "Prod/Test_Content_View_3", "Test/Test_Content_View_2"]}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: PUT + uri: https://foreman.example.org/katello/api/activation_keys/790 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Prod/Test_Content_View_3,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":166,"name":"Test + Content View 3","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":216,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":376},"lifecycle_environment":{"id":170,"name":"Prod","lifecycle_environment_library":false},"label":"Prod/Test_Content_View_3"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2014' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=96 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-36.yml b/tests/test_playbooks/fixtures/activation_key-36.yml new file mode 100644 index 0000000000..f2fbd7906d --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-36.yml @@ -0,0 +1,252 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":790,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Prod/Test_Content_View_3,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":166,"name":"Test + Content View 3","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":216,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":376},"lifecycle_environment":{"id":170,"name":"Prod","lifecycle_environment_library":false},"label":"Prod/Test_Content_View_3"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2157' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: DELETE + uri: https://foreman.example.org/katello/api/activation_keys/790 + response: + body: + string: ' {"id":"33cbc771-5cfc-42da-be61-68488a34d1eb","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + Activation Key activation key ''Test Activation Key with multiple CVs''; organization + ''Test Organization''","username":"admin","started_at":"2025-12-08 10:29:02 + UTC","ended_at":"2025-12-08 10:29:03 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":790,"name":"Test + Activation Key with multiple CVs"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"219c4765-4d88-429f-aa08-f00129590ec1","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Activation Key","input":[["activation_key",{"text":"activation key ''Test + Activation Key with multiple CVs''","link":"/activation_keys/790/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:29:02 UTC","available_actions":{"cancellable":false,"resumable":false}} + + ' + headers: + Cache-Control: + - no-cache + Connection: + - Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + Transfer-Encoding: + - chunked + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 202 + message: Accepted +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-37.yml b/tests/test_playbooks/fixtures/activation_key-37.yml new file mode 100644 index 0000000000..b3a5028141 --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-37.yml @@ -0,0 +1,246 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + response: + body: + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '172' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"name": "Test Activation Key", "organization_id": 69, "content_view_environments": + ["Dev/Test_Content_View_1", "Test/Test_Content_View_2"]}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '140' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: POST + uri: https://foreman.example.org/katello/api/activation_keys + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1601' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-38.yml b/tests/test_playbooks/fixtures/activation_key-38.yml new file mode 100644 index 0000000000..b4449bdfb8 --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-38.yml @@ -0,0 +1,441 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1726' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/791?organization_id=69 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1601' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 + response: + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test + Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1291' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=96 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + response: + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 + 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 + 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1384' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=95 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"organization_id": 69, "content_view_id": 163, "environment_id": 167}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: PUT + uri: https://foreman.example.org/katello/api/activation_keys/791 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1193' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=94 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-39.yml b/tests/test_playbooks/fixtures/activation_key-39.yml new file mode 100644 index 0000000000..5a471beb5f --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-39.yml @@ -0,0 +1,314 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1318' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/791?organization_id=69 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1193' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"organization_id": 69, "content_view_environments": ["Dev/Test_Content_View_1", + "Test/Test_Content_View_2"]}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '109' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: PUT + uri: https://foreman.example.org/katello/api/activation_keys/791 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1601' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=96 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-4.yml b/tests/test_playbooks/fixtures/activation_key-4.yml index b5ef8a308e..3ec87cb9e3 100644 --- a/tests/test_playbooks/fixtures/activation_key-4.yml +++ b/tests/test_playbooks/fixtures/activation_key-4.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":17,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:45 UTC","updated_at":"2024-04-15 16:24:46 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":782,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,14 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/17?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/782?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":17,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:45 UTC","updated_at":"2024-04-15 16:24:46 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":782,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,11 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1193' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,23 +216,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -244,12 +254,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test + Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} ' headers: @@ -258,11 +270,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1001' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1291' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -270,23 +278,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -302,18 +316,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":3,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"repository_ids":[],"id":3,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":3,"version":"1.0","published":"2024-04-15 - 16:24:34 UTC","description":null,"environment_ids":[3],"filters_applied":null,"published_at_words":"less - than a minute"}],"components":[],"content_view_components":[],"activation_keys":[{"id":17,"name":"Test - Activation Key"}],"hosts":[],"next_version":"1.0","last_published":"2024-04-15 - 16:24:34 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[17],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 + 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[{"id":782,"name":"Test + Activation Key"}],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 + 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[782],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -322,11 +336,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1384' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1426' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -334,23 +344,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-40.yml b/tests/test_playbooks/fixtures/activation_key-40.yml new file mode 100644 index 0000000000..484bf4aecf --- /dev/null +++ b/tests/test_playbooks/fixtures/activation_key-40.yml @@ -0,0 +1,251 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/api/status + response: + body: + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '94' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=100 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '389' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=99 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":791,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test + Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1726' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 69; Test Organization + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=98 + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: DELETE + uri: https://foreman.example.org/katello/api/activation_keys/791 + response: + body: + string: ' {"id":"956f066e-e160-4dd1-9b2a-f859be70fb24","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + Activation Key activation key ''Test Activation Key''; organization ''Test + Organization''","username":"admin","started_at":"2025-12-08 10:29:07 UTC","ended_at":"2025-12-08 + 10:29:07 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":791,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"d738a60b-9b0f-4ced-b8a3-60321174c895","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Activation Key","input":[["activation_key",{"text":"activation key ''Test + Activation Key''","link":"/activation_keys/791/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:29:07 UTC","available_actions":{"cancellable":false,"resumable":false}} + + ' + headers: + Cache-Control: + - no-cache + Connection: + - Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.16.0.7 + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + Transfer-Encoding: + - chunked + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 202 + message: Accepted +version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-5.yml b/tests/test_playbooks/fixtures/activation_key-5.yml index f1a23b4fe3..de8e4faf61 100644 --- a/tests/test_playbooks/fixtures/activation_key-5.yml +++ b/tests/test_playbooks/fixtures/activation_key-5.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":17,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:45 UTC","updated_at":"2024-04-15 16:24:46 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":782,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -186,18 +193,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/17 + uri: https://foreman.example.org/katello/api/activation_keys/782 response: body: - string: ' {"id":"d0ca36d1-e4d5-4a68-bd1c-a10f3e8192c2","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"805ee270-9c7b-49d9-8357-5bab54ce47cf","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2024-04-15 16:24:48 UTC","ended_at":"2024-04-15 - 16:24:48 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":17,"name":"Test - Activation Key"},"organization":{"id":4,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"fb03bbc0-0fa4-4d5a-8a59-0c56d5019b5f","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-08 10:28:32 UTC","ended_at":"2025-12-08 + 10:28:32 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":782,"name":"Test + Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"864446c5-9564-4ad0-a189-22f3b96f9f6c","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/17/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2024-04-15 - 16:24:48 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/782/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 + 10:28:32 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -205,10 +212,6 @@ interactions: - no-cache Connection: - Keep-Alive - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -218,23 +221,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted diff --git a/tests/test_playbooks/fixtures/activation_key-6.yml b/tests/test_playbooks/fixtures/activation_key-6.yml index dd0a7a8cc1..2f1f1fda78 100644 --- a/tests/test_playbooks/fixtures/activation_key-6.yml +++ b/tests/test_playbooks/fixtures/activation_key-6.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: 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''; - style-src ''unsafe-inline'' ''self''' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -180,12 +186,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test + Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} ' headers: @@ -194,11 +202,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1001' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1291' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -206,23 +210,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -238,17 +248,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":3,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"repository_ids":[],"id":3,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:34 UTC","updated_at":"2024-04-15 16:24:34 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":3,"version":"1.0","published":"2024-04-15 - 16:24:34 UTC","description":null,"environment_ids":[3],"filters_applied":null,"published_at_words":"less - than a minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2024-04-15 - 16:24:34 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 + 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 + 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -257,11 +267,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1344' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1384' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -269,29 +275,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Test Activation Key", "environment_id": - 3, "content_view_id": 3}' + body: '{"name": "Test Activation Key", "organization_id": 69, "content_view_id": + 163, "environment_id": 167}' headers: Accept: - application/json;version=2 @@ -300,7 +312,7 @@ interactions: Connection: - keep-alive Content-Length: - - '96' + - '101' Content-Type: - application/json User-Agent: @@ -309,11 +321,12 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -322,11 +335,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1193' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -334,23 +343,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created @@ -371,14 +386,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/18/content_override + uri: https://foreman.example.org/katello/api/activation_keys/783/content_override response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -387,11 +403,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '824' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1288' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -401,21 +413,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=94 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-7.yml b/tests/test_playbooks/fixtures/activation_key-7.yml index 26f7b4d396..393db62455 100644 --- a/tests/test_playbooks/fixtures/activation_key-7.yml +++ b/tests/test_playbooks/fixtures/activation_key-7.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,14 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,11 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '824' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1288' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,23 +216,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -244,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":2,"name":"Test - Product"},"content":{"id":2,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1713198278632","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test + Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} ' headers: @@ -259,10 +269,6 @@ interactions: - Keep-Alive Content-Length: - '788' - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -272,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-8.yml b/tests/test_playbooks/fixtures/activation_key-8.yml index 79c52be5bb..b7dede7a17 100644 --- a/tests/test_playbooks/fixtures/activation_key-8.yml +++ b/tests/test_playbooks/fixtures/activation_key-8.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,14 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,11 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '824' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1288' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,23 +216,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -244,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":2,"name":"Test - Product"},"content":{"id":2,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1713198278632","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test + Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} ' headers: @@ -259,10 +269,6 @@ interactions: - Keep-Alive Content-Length: - '788' - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -272,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -307,14 +319,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/18/content_override + uri: https://foreman.example.org/katello/api/activation_keys/783/content_override response: body: - string: ' {"service_level":null,"content_overrides":[],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -323,11 +336,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1193' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -337,21 +346,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/activation_key-9.yml b/tests/test_playbooks/fixtures/activation_key-9.yml index 77b84568d6..0e762e655b 100644 --- a/tests/test_playbooks/fixtures/activation_key-9.yml +++ b/tests/test_playbooks/fixtures/activation_key-9.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.11.0-develop","api_version":2}' + string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '100' - 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''; - style-src ''unsafe-inline'' ''self''' + - '94' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-04-15 - 16:24:33 UTC\",\"updated_at\":\"2024-04-15 16:24:34 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 + 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -79,11 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '388' - 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''; - style-src ''unsafe-inline'' ''self''' + - '389' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,15 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,11 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '856' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1318' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -152,23 +153,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,14 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18?organization_id=4 + uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":18,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2024-04-15 - 16:24:50 UTC","updated_at":"2024-04-15 16:24:50 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test + Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 + 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default + Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,11 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - 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''; - style-src ''unsafe-inline'' ''self''' + - '1193' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,23 +216,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 69; Test Organization Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -244,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/18/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":2,"name":"Test - Product"},"content":{"id":2,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1713198278632","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test + Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} ' headers: @@ -259,10 +269,6 @@ interactions: - Keep-Alive Content-Length: - '761' - 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''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -272,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.11.0-develop + - 3.16.0.7 Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + 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''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/tasks/activation_key.yml b/tests/test_playbooks/tasks/activation_key.yml index 17b5beff34..44895c3da8 100644 --- a/tests/test_playbooks/tasks/activation_key.yml +++ b/tests/test_playbooks/tasks/activation_key.yml @@ -14,6 +14,7 @@ organization: "{{ activation_key_organization }}" lifecycle_environment: "{{ activation_key_lifecycle_environment | default(omit) }}" content_view: "{{ activation_key_content_view | default(omit) }}" + content_view_environments: "{{ activation_key_content_view_environments | default(omit) }}" host_collections: "{{ activation_key_host_collections | default(omit) }}" auto_attach: "{{ activation_key_auto_attach | default(omit) }}" release_version: "{{ activation_key_release_version | default(omit) }}"