diff --git a/tests/test_playbooks/domain.yml b/tests/test_playbooks/domain.yml index 3e44e24b4e..de3ef2c882 100644 --- a/tests/test_playbooks/domain.yml +++ b/tests/test_playbooks/domain.yml @@ -47,13 +47,13 @@ include_tasks: tasks/domain.yml vars: domain_state: "present" - domain_dns_proxy: "{{ foreman_proxy }}" + domain_dns_proxy: "{{ foreman_host }}" expected_change: true - name: assign dns_proxy again, no change include_tasks: tasks/domain.yml vars: domain_state: "present" - domain_dns_proxy: "{{ foreman_proxy }}" + domain_dns_proxy: "{{ foreman_host }}" expected_change: false - name: unset dns_proxy include_tasks: tasks/domain.yml diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-0.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-0.yml index 3a8934a9f0..bb71598049 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-0.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-0.yml @@ -2,213 +2,292 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/environments?per_page=4294967296&search=name%3D%22Dev%22 + uri: https://foreman.example.org/katello/api/environments?search=name%3D%22Dev%22&per_page=4294967296 response: - body: {string: !!python/unicode '{"total":4,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Dev\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Dev","label":"dev","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:27 UTC","updated_at":"2020-10-20 15:09:27 UTC","prior":{"name":"Library","id":2},"successor":{"name":"Test","id":4},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Dev\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":6,"name":"Dev","label":"dev","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","prior":{"name":"Library","id":5},"successor":{"name":"Test","id":7},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['789'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '823' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - []\n}\n"} + body: + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['177'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '177' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + status: + code: 200 + message: OK - request: - body: !!python/unicode '{"smart_proxy": {"url": "http://foreman-proxy.example.com:8000", - "name": "Smart Proxy"}}' + body: '{"smart_proxy": {"name": "Smart Proxy", "url": "https://foreman-proxy.example.com:9090"}}' headers: - Accept: [application/json;version=2] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Content-Type: [application/json] - User-Agent: ['apypie (https://github.com/Apipie/apypie)'] + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '111' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) method: POST uri: https://foreman.example.org/api/smart_proxies response: - body: {string: !!python/unicode '{"created_at":"2020-10-21 09:15:38 UTC","updated_at":"2020-10-21 - 09:15:38 UTC","name":"Smart Proxy","id":15,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"on_demand","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:13:12 UTC","updated_at":"2024-07-10 14:13:12 + UTC","hosts_count":0,"name":"Smart Proxy","id":12,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"on_demand","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16},{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=97'] - strict-transport-security: [max-age=631139040; includeSubdomains] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 201, message: Created} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1813' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=97 + 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: + - 1; mode=block + status: + code: 201 + message: Created - 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/capsules/15/content/lifecycle_environments - response: - body: {string: !!python/unicode '{"total":0,"subtotal":0,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[]} - -'} - headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['125'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=96'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} -- request: - body: !!python/unicode '{"environment_id": 3}' + body: '{"environment_id": 6}' headers: - Accept: [application/json;version=2] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['21'] - Content-Type: [application/json] - User-Agent: ['apypie (https://github.com/Apipie/apypie)'] + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '21' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/capsules/15/content/lifecycle_environments + uri: https://foreman.example.org/katello/api/capsules/12/content/lifecycle_environments response: - body: {string: !!python/unicode '{"total":1,"subtotal":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Dev","label":"dev","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:27 UTC","updated_at":"2020-10-20 15:09:27 UTC","prior":{"name":"Library","id":2},"successor":{"name":"Test","id":4},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":6,"name":"Dev","label":"dev","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","prior":{"name":"Library","id":5},"successor":{"name":"Test","id":7},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['771'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=95'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '805' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=96 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-1.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-1.yml index 7657a0f7bf..fe0b24c6b0 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-1.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-1.yml @@ -2,178 +2,292 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/environments?per_page=4294967296&search=name%3D%22Dev%22 + uri: https://foreman.example.org/katello/api/environments?search=name%3D%22Dev%22&per_page=4294967296 response: - body: {string: !!python/unicode '{"total":4,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Dev\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Dev","label":"dev","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:27 UTC","updated_at":"2020-10-20 15:09:27 UTC","prior":{"name":"Library","id":2},"successor":{"name":"Test","id":4},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Dev\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":6,"name":"Dev","label":"dev","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","prior":{"name":"Library","id":5},"successor":{"name":"Test","id":7},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['789'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '823' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-21 09:15:38 UTC\",\"updated_at\":\"2020-10-21 09:15:38 - UTC\",\"name\":\"Smart Proxy\",\"id\":15,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:13:12 UTC\",\"updated_at\":\"2024-07-10 14:13:12 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":12,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[{\"id\":6,\"name\":\"Dev\",\"description\":null,\"library\":false,\"organization_id\":6,\"created_at\":\"2024-07-10 + 14:13:10 UTC\",\"updated_at\":\"2024-07-10 14:13:10 UTC\",\"label\":\"dev\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":\"Library\",\"prior_id\":5,\"organization\":\"Test + Organization\"}],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['775'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1855' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies/15 + uri: https://foreman.example.org/api/smart_proxies/12 response: - body: {string: !!python/unicode '{"created_at":"2020-10-21 09:15:38 UTC","updated_at":"2020-10-21 - 09:15:38 UTC","name":"Smart Proxy","id":15,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"on_demand","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:13:12 UTC","updated_at":"2024-07-10 14:13:12 + UTC","hosts_count":0,"name":"Smart Proxy","id":12,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"on_demand","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[{"id":6,"name":"Dev","description":null,"library":false,"organization_id":6,"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","label":"dev","registry_name_pattern":null,"registry_unauthenticated_pull":false,"prior":"Library","prior_id":5,"organization":"Test + Organization"}],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['632'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=97'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1712' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=97 + 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: + - 1; mode=block + 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)'] + 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/capsules/15/content/lifecycle_environments + uri: https://foreman.example.org/katello/api/capsules/12/content/lifecycle_environments response: - body: {string: !!python/unicode '{"total":1,"subtotal":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Dev","label":"dev","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:27 UTC","updated_at":"2020-10-20 15:09:27 UTC","prior":{"name":"Library","id":2},"successor":{"name":"Test","id":4},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":6,"name":"Dev","label":"dev","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","prior":{"name":"Library","id":5},"successor":{"name":"Test","id":7},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['771'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=96'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '805' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=96 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-2.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-2.yml index ef2aaf18fd..3eba960988 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-2.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-2.yml @@ -2,255 +2,416 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/environments?per_page=4294967296&search=name%3D%22Test%22 + uri: https://foreman.example.org/katello/api/environments?search=name%3D%22Test%22&per_page=4294967296 response: - body: {string: !!python/unicode '{"total":4,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Test","label":"test","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:31 UTC","updated_at":"2020-10-20 15:09:31 UTC","prior":{"name":"Dev","id":3},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":7,"name":"Test","label":"test","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","prior":{"name":"Dev","id":6},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['770'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '804' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-21 09:15:38 UTC\",\"updated_at\":\"2020-10-21 09:15:38 - UTC\",\"name\":\"Smart Proxy\",\"id\":15,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:13:12 UTC\",\"updated_at\":\"2024-07-10 14:13:12 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":12,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[{\"id\":6,\"name\":\"Dev\",\"description\":null,\"library\":false,\"organization_id\":6,\"created_at\":\"2024-07-10 + 14:13:10 UTC\",\"updated_at\":\"2024-07-10 14:13:10 UTC\",\"label\":\"dev\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":\"Library\",\"prior_id\":5,\"organization\":\"Test + Organization\"}],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['775'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1855' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies/15 + uri: https://foreman.example.org/api/smart_proxies/12 response: - body: {string: !!python/unicode '{"created_at":"2020-10-21 09:15:38 UTC","updated_at":"2020-10-21 - 09:15:38 UTC","name":"Smart Proxy","id":15,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"on_demand","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:13:12 UTC","updated_at":"2024-07-10 14:13:12 + UTC","hosts_count":0,"name":"Smart Proxy","id":12,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"on_demand","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[{"id":6,"name":"Dev","description":null,"library":false,"organization_id":6,"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","label":"dev","registry_name_pattern":null,"registry_unauthenticated_pull":false,"prior":"Library","prior_id":5,"organization":"Test + Organization"}],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['632'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=97'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1712' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=97 + 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: + - 1; mode=block + 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)'] + 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/capsules/15/content/lifecycle_environments + uri: https://foreman.example.org/katello/api/capsules/12/content/lifecycle_environments response: - body: {string: !!python/unicode '{"total":1,"subtotal":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Dev","label":"dev","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:27 UTC","updated_at":"2020-10-20 15:09:27 UTC","prior":{"name":"Library","id":2},"successor":{"name":"Test","id":4},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":6,"name":"Dev","label":"dev","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","prior":{"name":"Library","id":5},"successor":{"name":"Test","id":7},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['771'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=96'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '805' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=96 + 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: + - 1; mode=block + status: + code: 200 + message: OK - request: - body: !!python/unicode '{"environment_id": 4}' + body: '{"environment_id": 7}' headers: - Accept: [application/json;version=2] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['21'] - Content-Type: [application/json] - User-Agent: ['apypie (https://github.com/Apipie/apypie)'] + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '21' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/capsules/15/content/lifecycle_environments + uri: https://foreman.example.org/katello/api/capsules/12/content/lifecycle_environments response: - body: {string: !!python/unicode '{"total":2,"subtotal":2,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Dev","label":"dev","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:27 UTC","updated_at":"2020-10-20 15:09:27 UTC","prior":{"name":"Library","id":2},"successor":{"name":"Test","id":4},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}},{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Test","label":"test","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:31 UTC","updated_at":"2020-10-20 15:09:31 UTC","prior":{"name":"Dev","id":3},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":2,"subtotal":2,"selectable":2,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":6,"name":"Dev","label":"dev","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:10 UTC","updated_at":"2024-07-10 14:13:10 UTC","prior":{"name":"Library","id":5},"successor":{"name":"Test","id":7},"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]},{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":7,"name":"Test","label":"test","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","prior":{"name":"Dev","id":6},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['1398'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=95'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1451' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=95 + 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: + - 1; mode=block + 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)'] + 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/capsules/15/content/lifecycle_environments/3 + uri: https://foreman.example.org/katello/api/capsules/12/content/lifecycle_environments/6 response: - body: {string: !!python/unicode '{"total":1,"subtotal":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Test","label":"test","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:31 UTC","updated_at":"2020-10-20 15:09:31 UTC","prior":{"name":"Dev","id":3},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":7,"name":"Test","label":"test","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","prior":{"name":"Dev","id":6},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['751'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=94'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '785' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=94 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-3.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-3.yml index 1e39e740ad..9db3bd84c8 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-3.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-3.yml @@ -2,178 +2,292 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/environments?per_page=4294967296&search=name%3D%22Test%22 + uri: https://foreman.example.org/katello/api/environments?search=name%3D%22Test%22&per_page=4294967296 response: - body: {string: !!python/unicode '{"total":4,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Test","label":"test","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:31 UTC","updated_at":"2020-10-20 15:09:31 UTC","prior":{"name":"Dev","id":3},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test\"","sort":{"by":"name","order":"asc"},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":7,"name":"Test","label":"test","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","prior":{"name":"Dev","id":6},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['770'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '804' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-21 09:15:38 UTC\",\"updated_at\":\"2020-10-21 09:15:38 - UTC\",\"name\":\"Smart Proxy\",\"id\":15,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:13:12 UTC\",\"updated_at\":\"2024-07-10 14:13:12 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":12,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[{\"id\":7,\"name\":\"Test\",\"description\":null,\"library\":false,\"organization_id\":6,\"created_at\":\"2024-07-10 + 14:13:11 UTC\",\"updated_at\":\"2024-07-10 14:13:11 UTC\",\"label\":\"test\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":\"Dev\",\"prior_id\":6,\"organization\":\"Test + Organization\"}],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['775'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1853' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies/15 + uri: https://foreman.example.org/api/smart_proxies/12 response: - body: {string: !!python/unicode '{"created_at":"2020-10-21 09:15:38 UTC","updated_at":"2020-10-21 - 09:15:38 UTC","name":"Smart Proxy","id":15,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"on_demand","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:13:12 UTC","updated_at":"2024-07-10 14:13:12 + UTC","hosts_count":0,"name":"Smart Proxy","id":12,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"on_demand","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[{"id":7,"name":"Test","description":null,"library":false,"organization_id":6,"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","label":"test","registry_name_pattern":null,"registry_unauthenticated_pull":false,"prior":"Dev","prior_id":6,"organization":"Test + Organization"}],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['632'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=97'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1710' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=97 + 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: + - 1; mode=block + 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)'] + 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/capsules/15/content/lifecycle_environments + uri: https://foreman.example.org/katello/api/capsules/12/content/lifecycle_environments response: - body: {string: !!python/unicode '{"total":1,"subtotal":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Test","label":"test","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-10-20 - 15:09:31 UTC","updated_at":"2020-10-20 15:09:31 UTC","prior":{"name":"Dev","id":3},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true}}]} + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"library":false,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":7,"name":"Test","label":"test","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","prior":{"name":"Dev","id":6},"successor":null,"counts":{"content_hosts":0,"content_views":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":true,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} -'} + ' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['751'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=96'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '785' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=96 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-4.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-4.yml index 348bdf53e9..16e0d763ca 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-4.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-4.yml @@ -2,145 +2,239 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-21 09:15:38 UTC\",\"updated_at\":\"2020-10-21 09:15:38 - UTC\",\"name\":\"Smart Proxy\",\"id\":15,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:13:12 UTC\",\"updated_at\":\"2024-07-10 14:13:12 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":12,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[{\"id\":7,\"name\":\"Test\",\"description\":null,\"library\":false,\"organization_id\":6,\"created_at\":\"2024-07-10 + 14:13:11 UTC\",\"updated_at\":\"2024-07-10 14:13:11 UTC\",\"label\":\"test\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":\"Dev\",\"prior_id\":6,\"organization\":\"Test + Organization\"}],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['775'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1853' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies/15 + uri: https://foreman.example.org/api/smart_proxies/12 response: - body: {string: !!python/unicode '{"created_at":"2020-10-21 09:15:38 UTC","updated_at":"2020-10-21 - 09:15:38 UTC","name":"Smart Proxy","id":15,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"on_demand","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:13:12 UTC","updated_at":"2024-07-10 14:13:12 + UTC","hosts_count":0,"name":"Smart Proxy","id":12,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"on_demand","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[{"id":7,"name":"Test","description":null,"library":false,"organization_id":6,"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","label":"test","registry_name_pattern":null,"registry_unauthenticated_pull":false,"prior":"Dev","prior_id":6,"organization":"Test + Organization"}],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['632'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1710' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + status: + code: 200 + message: OK - request: - body: !!python/unicode '{"smart_proxy": {"download_policy": "background"}}' + body: '{"smart_proxy": {"download_policy": "immediate"}}' headers: - Accept: [application/json;version=2] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['50'] - Content-Type: [application/json] - User-Agent: ['apypie (https://github.com/Apipie/apypie)'] + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '49' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/smart_proxies/15 + uri: https://foreman.example.org/api/smart_proxies/12 response: - body: {string: !!python/unicode '{"created_at":"2020-10-21 09:15:38 UTC","updated_at":"2020-10-21 - 09:15:45 UTC","name":"Smart Proxy","id":15,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"background","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:13:12 UTC","updated_at":"2024-07-10 14:13:18 + UTC","hosts_count":0,"name":"Smart Proxy","id":12,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"immediate","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[{"id":7,"name":"Test","description":null,"library":false,"organization_id":6,"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","label":"test","registry_name_pattern":null,"registry_unauthenticated_pull":false,"prior":"Dev","prior_id":6,"organization":"Test + Organization"}],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16},{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - 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'''] - content-type: [application/json; charset=utf-8] - foreman_api_version: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=97'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2112' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=97 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-5.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-5.yml index b7d07505c1..89d43fc837 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-5.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-5.yml @@ -2,106 +2,176 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-21 09:15:38 UTC\",\"updated_at\":\"2020-10-21 09:15:45 - UTC\",\"name\":\"Smart Proxy\",\"id\":15,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"background\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:13:12 UTC\",\"updated_at\":\"2024-07-10 14:13:18 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":12,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"immediate\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[{\"id\":7,\"name\":\"Test\",\"description\":null,\"library\":false,\"organization_id\":6,\"created_at\":\"2024-07-10 + 14:13:11 UTC\",\"updated_at\":\"2024-07-10 14:13:11 UTC\",\"label\":\"test\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":\"Dev\",\"prior_id\":6,\"organization\":\"Test + Organization\"}],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['776'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1853' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies/15 + uri: https://foreman.example.org/api/smart_proxies/12 response: - body: {string: !!python/unicode '{"created_at":"2020-10-21 09:15:38 UTC","updated_at":"2020-10-21 - 09:15:45 UTC","name":"Smart Proxy","id":15,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"background","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:13:12 UTC","updated_at":"2024-07-10 14:13:18 + UTC","hosts_count":0,"name":"Smart Proxy","id":12,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"immediate","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[{"id":7,"name":"Test","description":null,"library":false,"organization_id":6,"created_at":"2024-07-10 + 14:13:11 UTC","updated_at":"2024-07-10 14:13:11 UTC","label":"test","registry_name_pattern":null,"registry_unauthenticated_pull":false,"prior":"Dev","prior_id":6,"organization":"Test + Organization"}],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['633'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1710' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-6.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-6.yml index 08fb1132b1..213aedfce5 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-6.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-6.yml @@ -2,104 +2,175 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-21 09:15:38 UTC\",\"updated_at\":\"2020-10-21 09:15:45 - UTC\",\"name\":\"Smart Proxy\",\"id\":15,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"background\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:13:12 UTC\",\"updated_at\":\"2024-07-10 14:13:18 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":12,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"immediate\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[{\"id\":7,\"name\":\"Test\",\"description\":null,\"library\":false,\"organization_id\":6,\"created_at\":\"2024-07-10 + 14:13:11 UTC\",\"updated_at\":\"2024-07-10 14:13:11 UTC\",\"label\":\"test\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":\"Dev\",\"prior_id\":6,\"organization\":\"Test + Organization\"}],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['776'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1853' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/api/smart_proxies/15 + uri: https://foreman.example.org/api/smart_proxies/12 response: - body: {string: !!python/unicode '{"id":15,"name":"Smart Proxy","url":"http://foreman-proxy.example.com:8000","created_at":"2020-10-21T09:15:38.009Z","updated_at":"2020-10-21T09:15:45.892Z","pubkey":null,"expired_logs":"0","puppet_path":null,"download_policy":"background"}'} + body: + string: '{"id":12,"name":"Smart Proxy","url":"https://foreman-proxy.example.com:9090","created_at":"2024-07-10T14:13:12.420Z","updated_at":"2024-07-10T14:13:18.817Z","pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","expired_logs":"0","puppet_path":null,"download_policy":"immediate","http_proxy_id":null,"content_counts":null}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['239'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '916' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/katello_smart_proxy-7.yml b/tests/test_playbooks/fixtures/katello_smart_proxy-7.yml index e73b5ca187..20813fe72f 100644 --- a/tests/test_playbooks/fixtures/katello_smart_proxy-7.yml +++ b/tests/test_playbooks/fixtures/katello_smart_proxy-7.yml @@ -2,68 +2,111 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - []\n}\n"} + body: + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['177'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '177' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/puppetclasses_import-0.yml b/tests/test_playbooks/fixtures/puppetclasses_import-0.yml index 94beb10667..8dc4ce713d 100644 --- a/tests/test_playbooks/fixtures/puppetclasses_import-0.yml +++ b/tests/test_playbooks/fixtures/puppetclasses_import-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.3.0","api_version":2}' + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","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''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.3.0 + - 3.12.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -67,23 +65,28 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-3.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22ip-10-0-167-225.rhos-01.prod.psi.rdu2.redhat.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-3.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-12-03 11:27:11 UTC\",\"updated_at\":\"2020-12-03\ - \ 11:27:11 UTC\",\"name\":\"centos7-foreman-2-3.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-3.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":6},{\"capabilities\"\ - :[],\"name\":\"Puppet\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"\ - id\":10},{\"capabilities\":[],\"name\":\"Registration\",\"id\":13}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"ip-10-0-167-225.rhos-01.prod.psi.rdu2.redhat.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-07-03 18:09:22 UTC\",\"updated_at\":\"2024-07-09 15:35:50 + UTC\",\"hosts_count\":1,\"name\":\"ip-10-0-167-225.rhos-01.prod.psi.rdu2.redhat.com\",\"id\":1,\"url\":\"https://ip-10-0-167-225.rhos-01.prod.psi.rdu2.redhat.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDrGPQiZom0IMvynGjO7JaQq0y+b9IyNeGWmCG3SewT4JQ9pd9m5zRkN6q3iqNikRipcaWrLWhDo4IYaURfSXcW+90wS9IlbXp8BNtMAUMDSAvbO/XqCIV0XAAAyQgC4dHssXTwB5ESV9rW5h9cE25+VA+cPP3tiRQDZvmY6YyyXoewdjawGbL4U/iX1+zEOXWrbNYJTDiNe83wEzpXbJuS7N8bn97qaeSq3l9xFphp6DI0cIP9k5S1Ts9YcfEs3TyT1lW0XoxCt5fQ59IjZbgzY0vB6BBqwl/bnq11j0y3fqIX+f51MZEqZ/3S/OU21//CsIrLq6sebhX72l+KEU8f8sLi8JC1x7xR6o0VCHpnN0M/K8XSrpyB43qKh1Q2av0SFElbrsOeynCBawByNEkXpSOLJKUL4EoQyOepkSZJrfaWocHif/hkjOXvXIAt0Fcqagynoh9Dtz3zikvs9YhDAnD8JtlHZ8Rlgm6o9pHNa3h5ItuArgySD3g1ZYJkPus= + foreman-proxy@ip-10-0-217-189.rhos-01.prod.psi.rdu2.redhat.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[{\"id\":1,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":1,\"created_at\":\"2024-07-03 + 18:05:53 UTC\",\"updated_at\":\"2024-07-03 18:05:53 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Default + Organization\"},{\"id\":5,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":6,\"created_at\":\"2024-07-10 + 14:10:24 UTC\",\"updated_at\":\"2024-07-10 14:10:24 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Organization\"}],\"features\":[{\"capabilities\":[\"ansible-runner\",\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":21},{\"capabilities\":[],\"name\":\"Discovery\",\"id\":20},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":23},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":6},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"DNS\",\"id\":7},{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":24},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":14}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2467' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -97,13 +100,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.3.0 + - 3.12.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -114,8 +115,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '589' status: code: 200 message: OK @@ -138,17 +137,14 @@ interactions: uri: https://foreman.example.org/api/smart_proxies/1/import_puppetclasses response: body: - string: "{\n \"message\": \"Successfully updated environment and puppetclasses\ - \ from the on-disk puppet installation\",\n \"environments_with_new_puppetclasses\"\ - : 1,\n \"environments_updated_puppetclasses\": 0,\n \"environments_obsolete\"\ - : 0,\n \"environments_ignored\": 0,\n \"results\": [{\"name\":\"production\"\ - ,\"actions\":[\"new\"],\"new_puppetclasses\":[\"apache::confd::no_accf\",\"\ - apache::default_confd_files\",\"apache::default_mods\",\"apache\"]}]\n}\n" + string: '{"message":"No changes to your environments detected"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '54' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -162,13 +158,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.3.0 + - 3.12.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -179,8 +173,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '418' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/puppetclasses_import-1.yml b/tests/test_playbooks/fixtures/puppetclasses_import-1.yml deleted file mode 100644 index 3f6a281a01..0000000000 --- a/tests/test_playbooks/fixtures/puppetclasses_import-1.yml +++ /dev/null @@ -1,182 +0,0 @@ -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: '{"result":"ok","status":200,"version":"2.3.0","api_version":2}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - 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: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 2.3.0 - Keep-Alive: - - timeout=15, max=100 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Frame-Options: - - sameorigin - X-Permitted-Cross-Domain-Policies: - - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '62' - 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/api/smart_proxies?search=name%3D%22centos7-foreman-2-3.yatsu.example.com%22&per_page=4294967296 - response: - body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-3.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-12-03 11:27:11 UTC\",\"updated_at\":\"2020-12-03\ - \ 11:27:11 UTC\",\"name\":\"centos7-foreman-2-3.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-3.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":6},{\"capabilities\"\ - :[],\"name\":\"Puppet\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"\ - id\":10},{\"capabilities\":[],\"name\":\"Registration\",\"id\":13}]}]\n}\n" - headers: - Cache-Control: - - max-age=0, private, must-revalidate - 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: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 2.3.0 - Keep-Alive: - - timeout=15, max=99 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Frame-Options: - - sameorigin - X-Permitted-Cross-Domain-Policies: - - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '589' - status: - code: 200 - message: OK -- request: - body: '{}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/api/smart_proxies/1/import_puppetclasses - response: - body: - string: '{"message":"No changes to your environments detected"}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - 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: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 2.3.0 - Keep-Alive: - - timeout=15, max=98 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Frame-Options: - - sameorigin - X-Permitted-Cross-Domain-Policies: - - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '54' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/test_playbooks/fixtures/smart_proxy-0.yml b/tests/test_playbooks/fixtures/smart_proxy-0.yml index 1570b569ab..776de9491a 100644 --- a/tests/test_playbooks/fixtures/smart_proxy-0.yml +++ b/tests/test_playbooks/fixtures/smart_proxy-0.yml @@ -2,105 +2,172 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - []\n}\n"} + body: + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['177'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '177' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + status: + code: 200 + message: OK - request: - body: !!python/unicode '{"smart_proxy": {"url": "http://foreman-proxy.example.com:8000", - "name": "Smart Proxy"}}' + body: '{"smart_proxy": {"name": "Smart Proxy", "url": "https://foreman-proxy.example.com:9090"}}' headers: - Accept: [application/json;version=2] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Content-Type: [application/json] - User-Agent: ['apypie (https://github.com/Apipie/apypie)'] + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '111' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) method: POST uri: https://foreman.example.org/api/smart_proxies response: - body: {string: !!python/unicode '{"created_at":"2020-10-20 15:41:46 UTC","updated_at":"2020-10-20 - 15:41:46 UTC","name":"Smart Proxy","id":13,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"on_demand","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:25:39 UTC","updated_at":"2024-07-10 14:25:39 + UTC","hosts_count":0,"name":"Smart Proxy","id":14,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"on_demand","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16},{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 201, message: Created} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1813' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + status: + code: 201 + message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/smart_proxy-1.yml b/tests/test_playbooks/fixtures/smart_proxy-1.yml index afe96d1931..d490101426 100644 --- a/tests/test_playbooks/fixtures/smart_proxy-1.yml +++ b/tests/test_playbooks/fixtures/smart_proxy-1.yml @@ -2,106 +2,172 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-20 15:41:46 UTC\",\"updated_at\":\"2020-10-20 15:41:46 - UTC\",\"name\":\"Smart Proxy\",\"id\":13,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:25:39 UTC\",\"updated_at\":\"2024-07-10 14:25:39 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":14,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['775'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1554' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies/13 + uri: https://foreman.example.org/api/smart_proxies/14 response: - body: {string: !!python/unicode '{"created_at":"2020-10-20 15:41:46 UTC","updated_at":"2020-10-20 - 15:41:46 UTC","name":"Smart Proxy","id":13,"url":"http://foreman-proxy.example.com:8000","remote_execution_pubkey":null,"download_policy":"on_demand","supported_pulp_types":{"pulp2":{"supported_types":["deb","docker","file","puppet","yum"]},"pulp3":{"supported_types":[],"overriden_to_pulp2":[]}},"features":[{"capabilities":[],"name":"Pulp - Node","id":3},{"capabilities":[],"name":"Templates","id":1},{"capabilities":[],"name":"Puppet - CA","id":9},{"capabilities":[],"name":"Puppet","id":8},{"capabilities":[],"name":"Logs","id":13}],"locations":[],"organizations":[]}'} + body: + string: '{"created_at":"2024-07-10 14:25:39 UTC","updated_at":"2024-07-10 14:25:39 + UTC","hosts_count":0,"name":"Smart Proxy","id":14,"url":"https://foreman-proxy.example.com:9090","remote_execution_pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","download_policy":"on_demand","supported_pulp_types":["ansible_collection","docker","file","yum"],"lifecycle_environments":[],"features":[{"capabilities":[],"name":"Container_Gateway","id":4},{"capabilities":["single","ssh"],"name":"Dynflow","id":17},{"capabilities":["cockpit"],"name":"Script","id":19},{"capabilities":["ansible","certguard","container","core","file","rpm"],"name":"Pulpcore","id":3},{"capabilities":[],"name":"Templates","id":5},{"capabilities":[],"name":"Logs","id":13},{"capabilities":[],"name":"Registration","id":16}],"locations":[],"organizations":[]}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['632'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1411' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/smart_proxy-2.yml b/tests/test_playbooks/fixtures/smart_proxy-2.yml index cc0d073aed..9c25a1a218 100644 --- a/tests/test_playbooks/fixtures/smart_proxy-2.yml +++ b/tests/test_playbooks/fixtures/smart_proxy-2.yml @@ -2,104 +2,173 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2020-10-20 15:41:46 UTC\",\"updated_at\":\"2020-10-20 15:41:46 - UTC\",\"name\":\"Smart Proxy\",\"id\":13,\"url\":\"http://foreman-proxy.example.com:8000\",\"remote_execution_pubkey\":null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"puppet\",\"yum\"]},\"pulp3\":{\"supported_types\":[],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Pulp - Node\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":1},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":8},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13}]}]\n}\n"} + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-07-10 + 14:25:39 UTC\",\"updated_at\":\"2024-07-10 14:25:39 UTC\",\"hosts_count\":0,\"name\":\"Smart + Proxy\",\"id\":14,\"url\":\"https://foreman-proxy.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"docker\",\"file\",\"yum\"],\"lifecycle_environments\":[],\"features\":[{\"capabilities\":[],\"name\":\"Container_Gateway\",\"id\":4},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Templates\",\"id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[],\"name\":\"Registration\",\"id\":16}]}]\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['775'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1554' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + 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)'] + 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/api/smart_proxies/13 + uri: https://foreman.example.org/api/smart_proxies/14 response: - body: {string: !!python/unicode '{"id":13,"name":"Smart Proxy","url":"http://foreman-proxy.example.com:8000","created_at":"2020-10-20T15:41:46.087Z","updated_at":"2020-10-20T15:41:46.087Z","pubkey":null,"expired_logs":"0","puppet_path":null,"download_policy":"on_demand"}'} + body: + string: '{"id":14,"name":"Smart Proxy","url":"https://foreman-proxy.example.com:9090","created_at":"2024-07-10T14:25:39.746Z","updated_at":"2024-07-10T14:25:39.964Z","pubkey":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCkn5pNuZ47pHDMpL1or9cDtaDJaJXn2EdrmcQBiXQOhoWjSn3R2da7ThZkjXGTirQrMeU8FeDpZUso368rUGU4PFg8JHCwuNF7X+mcOeodK3EJyGHIfsj172xF8wAHUc4tK2MSIKDfVd8MvX4M3qPN80290wmhCh4YrKFA30az96eSP4RDt19m3/qxTXpcmSRyuw1NKr0DUs4lCG08uV4hMpheypT21HM8eb3NSic73fY0nTLOerTwo9BUdQugjdiBNjlA9o9MzSZ6acCiOqAxqYEnVlWKqfgsy/55uBCAi4rO78sIKptvb+g1i1l86HNj/6xtwlrsXNft1p6MwcGDb66naRDARhzNLWUlrM6yqXpOkHEK1w76zaNw0RfwsxFSbZx5TueQQ1QI/DIxcIX0bIBSiVsp39TneEwFQqXu0a7dvst4LAKIOii6GtEc6FIcuCX49x6qe0VsJvHBS3LgKBcfTUUvWkm67qNX3Xaik1MKjvredkcH+7byxL+TiDE= + foreman-proxy@foreman-proxy.example.com","expired_logs":"0","puppet_path":null,"download_policy":"on_demand","http_proxy_id":null,"content_counts":null}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['238'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=98'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '916' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=98 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/smart_proxy-3.yml b/tests/test_playbooks/fixtures/smart_proxy-3.yml index e73b5ca187..20813fe72f 100644 --- a/tests/test_playbooks/fixtures/smart_proxy-3.yml +++ b/tests/test_playbooks/fixtures/smart_proxy-3.yml @@ -2,68 +2,111 @@ 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)'] + 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: !!python/unicode '{"result":"ok","status":200,"version":"2.2.0-rc3","api_version":2}'} + body: + string: '{"satellite_version":"6.16.0","result":"ok","status":200,"version":"3.12.0-develop","api_version":2}' headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['66'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=100'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + 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''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=100 + 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: + - 1; mode=block + 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)'] + 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/smart_proxies?per_page=4294967296&search=name%3D%22Smart+Proxy%22 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22Smart+Proxy%22&per_page=4294967296 response: - body: {string: !!python/unicode "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - []\n}\n"} + body: + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Smart Proxy\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: - cache-control: ['max-age=0, private, must-revalidate'] - connection: [Keep-Alive] - content-length: ['177'] - content-security-policy: ['default-src ''self''; 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: ['2'] - foreman_current_location: [; ANY] - foreman_current_organization: [; ANY] - foreman_version: [2.2.0-rc3] - keep-alive: ['timeout=15, max=99'] - strict-transport-security: [max-age=631139040; includeSubdomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-download-options: [noopen] - x-frame-options: [sameorigin] - x-permitted-cross-domain-policies: [none] - x-xss-protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '177' + Content-Security-Policy: + - 'default-src ''self''; 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: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.12.0-develop + Keep-Alive: + - timeout=15, max=99 + 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: + - 1; mode=block + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/katello_smart_proxy.yml b/tests/test_playbooks/katello_smart_proxy.yml index 437a9f7c35..c38367ffd6 100644 --- a/tests/test_playbooks/katello_smart_proxy.yml +++ b/tests/test_playbooks/katello_smart_proxy.yml @@ -82,12 +82,12 @@ - 'Test' - include_tasks: tasks/smart_proxy.yml vars: - smart_proxy_download_policy: background + smart_proxy_download_policy: immediate smart_proxy_state: present expected_change: true - include_tasks: tasks/smart_proxy.yml vars: - smart_proxy_download_policy: background + smart_proxy_download_policy: immediate smart_proxy_state: present expected_change: false - include_tasks: tasks/smart_proxy.yml diff --git a/tests/test_playbooks/puppetclasses_import.yml b/tests/test_playbooks/puppetclasses_import.yml index a19852d8bc..76dd90e6eb 100644 --- a/tests/test_playbooks/puppetclasses_import.yml +++ b/tests/test_playbooks/puppetclasses_import.yml @@ -25,10 +25,10 @@ - include_tasks: tasks/puppetclasses_import.yml vars: expected_change: true - puppetclasses_smart_proxy: "{{ foreman_proxy }}" + puppetclasses_smart_proxy: "{{ foreman_host }}" - include_tasks: tasks/puppetclasses_import.yml vars: - puppetclasses_smart_proxy: "{{ foreman_proxy }}" + puppetclasses_smart_proxy: "{{ foreman_host }}" expected_change: false - hosts: localhost diff --git a/tests/test_playbooks/smart_proxy.yml b/tests/test_playbooks/smart_proxy.yml index b0351d55b9..7d4ca3d1a3 100644 --- a/tests/test_playbooks/smart_proxy.yml +++ b/tests/test_playbooks/smart_proxy.yml @@ -42,7 +42,7 @@ expected_change: true expected_diff: true expected_diff_before: "{}" - expected_diff_after: "foreman-proxy.example.com" + expected_diff_after: "{{ foreman_proxy }}" - include_tasks: tasks/smart_proxy.yml vars: smart_proxy_state: present @@ -52,7 +52,7 @@ smart_proxy_state: absent expected_change: true expected_diff: true - expected_diff_before: "foreman-proxy.example.com" + expected_diff_before: "{{ foreman_proxy }}" expected_diff_after: "{}" - include_tasks: tasks/smart_proxy.yml vars: diff --git a/tests/test_playbooks/tasks/smart_proxy.yml b/tests/test_playbooks/tasks/smart_proxy.yml index 4e51a58942..243f8cd404 100644 --- a/tests/test_playbooks/tasks/smart_proxy.yml +++ b/tests/test_playbooks/tasks/smart_proxy.yml @@ -2,7 +2,7 @@ - name: "Ensure Smart Proxy '{{ smart_proxy_name }}' is {{ smart_proxy_state }}" vars: smart_proxy_name: "Smart Proxy" - smart_proxy_url: "http://foreman-proxy.example.com:8000" + smart_proxy_url: "https://{{ foreman_proxy }}:9090" smart_proxy: username: "{{ foreman_username }}" password: "{{ foreman_password }}" diff --git a/tests/test_playbooks/vars/hostgroup.yml b/tests/test_playbooks/vars/hostgroup.yml index 2738dbd8de..a77fb621e8 100644 --- a/tests/test_playbooks/vars/hostgroup.yml +++ b/tests/test_playbooks/vars/hostgroup.yml @@ -25,11 +25,11 @@ hostgroup: - bar.example.com subnet: Test subnet4 subne6: Test subnet6 - puppet_server: "{{ foreman_proxy }}" - puppet_ca: "{{ foreman_proxy }}" - dns_proxy: "{{ foreman_proxy }}" - openscap_proxy: "{{ foreman_proxy }}" - content_source: "{{ foreman_proxy }}" + puppet_server: "{{ foreman_host }}" + puppet_ca: "{{ foreman_host }}" + dns_proxy: "{{ foreman_host }}" + openscap_proxy: "{{ foreman_host }}" + content_source: "{{ foreman_host }}" lifecycle_environment: "Library" content_view: name: my_content diff --git a/tests/test_playbooks/vars/server.yml.example b/tests/test_playbooks/vars/server.yml.example index d450536365..80817f38e4 100644 --- a/tests/test_playbooks/vars/server.yml.example +++ b/tests/test_playbooks/vars/server.yml.example @@ -5,7 +5,7 @@ foreman_password: "changeme" foreman_server_url: "https://foreman.example.com" foreman_validate_certs: false -foreman_proxy: "foreman.example.com" +foreman_proxy: "foreman-proxy.example.com" # Parameter for snapshot test snapshot_host_name: "test_host" diff --git a/tests/test_playbooks/vars/subnet.yml b/tests/test_playbooks/vars/subnet.yml index 3988464e27..12524f3a4f 100644 --- a/tests/test_playbooks/vars/subnet.yml +++ b/tests/test_playbooks/vars/subnet.yml @@ -9,4 +9,4 @@ subnet_locs: subnet_doms: - foo.example.com - bar.example.com -subnet_proxy: "{{ foreman_proxy }}" +subnet_proxy: "{{ foreman_host }}"