diff --git a/tests/test_playbooks/fixtures/resource_info-0.yml b/tests/test_playbooks/fixtures/resource_info-0.yml index 8085be3298..966ae8ca7d 100644 --- a/tests/test_playbooks/fixtures/resource_info-0.yml +++ b/tests/test_playbooks/fixtures/resource_info-0.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:43 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=a126f6c4c85f96d4b8c4d538838d449c; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - a2cdb87f-2061-4eb0-ab7b-a6a895c5e057 - x-runtime: - - '0.105805' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,52 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=a126f6c4c85f96d4b8c4d538838d449c User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/settings?per_page=4294967296&search=name+%3D+http_proxy + uri: https://foreman.example.org/api/settings?search=name+%3D+http_proxy&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 135,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name = http_proxy\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"value\":null,\"description\":\"Sets - a proxy for all outgoing HTTP connections.\",\"category\":\"Setting::General\",\"settings_type\":null,\"default\":null,\"created_at\":\"2019-10-18 - 08:35:25 UTC\",\"updated_at\":\"2019-10-18 08:35:25 UTC\",\"id\":11,\"name\":\"http_proxy\",\"full_name\":\"HTTP(S) - proxy\",\"category_name\":\"General\"}]\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name = http_proxy\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"description\":\"Set a + proxy for all outgoing HTTP(S) connections from Foreman. System-wide proxies + must be configured at the operating system level.\",\"settings_type\":null,\"default\":null,\"updated_at\":null,\"id\":\"http_proxy\",\"name\":\"http_proxy\",\"full_name\":\"HTTP(S) + proxy\",\"value\":null,\"category\":\"general\",\"category_name\":\"General\",\"readonly\":false,\"config_file\":null,\"encrypted\":false,\"select_values\":null}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '480' - content-security-policy: + Content-Length: + - '579' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:43 GMT - etag: - - W/"2c9ad527f2fde387381ba7e9b3cf97c6-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 75384dfa-3738-47c6-aa81-841a93fe775d - x-runtime: - - '0.017151' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-1.yml b/tests/test_playbooks/fixtures/resource_info-1.yml index 6d68da70a3..00a93f457e 100644 --- a/tests/test_playbooks/fixtures/resource_info-1.yml +++ b/tests/test_playbooks/fixtures/resource_info-1.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=9019c95e4f41ab6ce2a6328805e6430b; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 56967311-f69f-48a2-8e4c-8b55f049d2af - x-runtime: - - '0.104241' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,67 +62,49 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=9019c95e4f41ab6ce2a6328805e6430b User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/subnets?per_page=4294967296&search= + uri: https://foreman.example.org/api/http_proxies?per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": []\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '157' - content-security-policy: + Content-Length: + - '159' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"40a0449a96292ac57dbe10f6cd6b803f-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 46b4d8c8-5b8f-498c-99f4-309e49d4e259 - x-runtime: - - '0.014897' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-2.yml b/tests/test_playbooks/fixtures/resource_info-2.yml index 3fdc4fd623..caf59a26ac 100644 --- a/tests/test_playbooks/fixtures/resource_info-2.yml +++ b/tests/test_playbooks/fixtures/resource_info-2.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=71f8f43250e23094d5efa700350f0f82; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - c4cb2a52-3b5e-4fdc-9a85-33561a87b5e5 - x-runtime: - - '0.103725' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,51 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=71f8f43250e23094d5efa700350f0f82 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations?per_page=4294967296&search=name%3D%22Test+Organization%22 + uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-29 - 12:01:40 UTC\",\"updated_at\":\"2019-11-29 12:01:40 UTC\",\"id\":47,\"name\":\"Test + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-09-10 + 09:43:47 UTC\",\"updated_at\":\"2024-09-10 09:43:47 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '413' - content-security-policy: + Content-Length: + - '412' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"b9429d1d6ba5f213c78314f2e086bca4-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 687e73d9-d361-473d-8e37-2f5d60aca46c - x-runtime: - - '0.016046' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -155,90 +120,163 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=71f8f43250e23094d5efa700350f0f82 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations/47 + uri: https://foreman.example.org/api/organizations/5 response: body: - string: !!python/unicode '{"select_all_types":[],"description":"A test organization","created_at":"2019-11-29 - 12:01:40 UTC","updated_at":"2019-11-29 12:01:40 UTC","ancestry":null,"parent_id":null,"parent_name":null,"id":47,"name":"Test - Organization","title":"Test Organization","users":[],"smart_proxies":[],"subnets":[],"compute_resources":[],"media":[],"config_templates":[],"ptables":[{"os_family":"Suse","created_at":"2019-10-18 - 08:35:40 UTC","updated_at":"2019-10-18 08:35:40 UTC","name":"AutoYaST entire - SCSI disk","id":97},{"os_family":"Suse","created_at":"2019-10-18 08:35:40 - UTC","updated_at":"2019-10-18 08:35:40 UTC","name":"AutoYaST entire virtual - disk","id":98},{"os_family":"Suse","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"AutoYaST LVM","id":99},{"os_family":"Coreos","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"CoreOS default - fake","id":100},{"os_family":"Rancheros","created_at":"2019-10-18 08:35:41 - UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Empty","id":101},{"os_family":"Freebsd","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"FreeBSD default - fake","id":102},{"os_family":"Solaris","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"Jumpstart default","id":103},{"os_family":"Solaris","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Jumpstart mirrored","id":104},{"os_family":"Junos","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Junos default - fake","id":105},{"os_family":"Redhat","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"Kickstart default","id":106},{"os_family":"Redhat","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Kickstart default - thin","id":107},{"os_family":"NXOS","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"NX-OS default fake","id":108},{"os_family":"Debian","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Preseed default","id":109},{"os_family":"Debian","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Preseed default - LVM","id":110},{"os_family":"Xenserver","created_at":"2019-10-18 08:35:41 - UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"XenServer default","id":111}],"provisioning_templates":[],"domains":[{"id":12,"name":"test.invalid"}],"realms":[],"environments":[],"hostgroups":[],"locations":[{"id":2,"name":"Default - Location","title":"Default Location","description":null}],"hosts_count":0,"parameters":[]}' + string: '{"select_all_types":[],"description":"A test organization","created_at":"2024-09-10 + 09:43:47 UTC","updated_at":"2024-09-10 09:43:47 UTC","ancestry":null,"parent_id":null,"parent_name":null,"id":5,"name":"Test + Organization","title":"Test Organization","users":[],"smart_proxies":[],"subnets":[],"compute_resources":[],"media":[],"ptables":[{"description":null,"os_family":"Suse","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"AutoYaST entire + SCSI disk","id":132,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"AutoYaST entire + virtual disk","id":133,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"AutoYaST LVM","id":134,"inherited":false},{"description":null,"os_family":"Coreos","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"CoreOS default + fake","id":135,"inherited":false},{"description":null,"os_family":"Rancheros","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Empty","id":136,"inherited":false},{"description":null,"os_family":"Freebsd","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"FreeBSD default + fake","id":137,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Jumpstart default","id":138,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Jumpstart mirrored","id":139,"inherited":false},{"description":null,"os_family":"Junos","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Junos default + fake","id":140,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart custom","id":141,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart default","id":142,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart default + encrypted","id":143,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart default + thin","id":144,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart dynamic","id":145,"inherited":false},{"description":null,"os_family":"NXOS","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"NX-OS default + fake","id":146,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default","id":147,"inherited":false},{"description":"Preseed + Autoinstall default storage snippet configures drives automatically\nwith + LVM. The snippet is automatically indented by 2 spaces. For reference:\nhttps://ubuntu.com/server/docs/install/autoinstall-reference","os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default + autoinstall","id":148,"inherited":false},{"description":"Preseed Autoinstall + default storage snippet configures drives automatically\nwith LVM and disk + encryption.\nRequires Ubuntu >= 22.04.3.\nThe snippet is automatically indented + by 2 spaces. For reference:\nhttps://ubuntu.com/server/docs/install/autoinstall-reference","os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default + autoinstall encrypted","id":149,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default + LVM","id":150,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Windows default + GPT EFI partition table","id":152,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Windows default + partition table","id":151,"inherited":false},{"description":null,"os_family":"Xenserver","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"XenServer default","id":153,"inherited":false}],"provisioning_templates":[{"id":50,"name":"Alterator + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":32,"name":"Alterator + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":13,"name":"Alterator + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":69,"name":"alterator_pkglist","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":71,"name":"ansible_provisioning_callback","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":73,"name":"ansible_tower_callback_script","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":75,"name":"ansible_tower_callback_service","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":51,"name":"AutoYaST + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":41,"name":"AutoYaST + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":2,"name":"AutoYaST + default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":7,"name":"AutoYaST + default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":14,"name":"AutoYaST + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":125,"name":"AutoYaST + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":52,"name":"AutoYaST + SLES default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":77,"name":"blacklist_kernel_modules","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":78,"name":"bmc_nic_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":79,"name":"built","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":80,"name":"ca_registration","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":81,"name":"chef_client","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":31,"name":"CloudInit + default","template_kind_id":12,"template_kind_name":"cloud-init","inherited":false},{"id":82,"name":"coreos_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":53,"name":"CoreOS + provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":15,"name":"CoreOS + PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":83,"name":"create_users","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":84,"name":"csr_attributes.yaml","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":85,"name":"disk_enc_clevis_tang","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":86,"name":"efibootmgr_netboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":87,"name":"eject_cdrom","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":88,"name":"epel","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":89,"name":"fips_packages","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":90,"name":"fix_hosts","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":63,"name":"foreman_ca_refresh","template_kind_id":16,"template_kind_name":"public","inherited":false},{"id":64,"name":"foreman_raw_ca","template_kind_id":16,"template_kind_name":"public","inherited":false},{"id":33,"name":"FreeBSD + (mfsBSD) finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":54,"name":"FreeBSD + (mfsBSD) provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":16,"name":"FreeBSD + (mfsBSD) PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":91,"name":"freeipa_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":65,"name":"Global + Registration","template_kind_id":13,"template_kind_name":"registration","inherited":false},{"id":67,"name":"Grubby + default","template_kind_id":8,"template_kind_name":"script","inherited":false},{"id":92,"name":"http_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":93,"name":"insights","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":42,"name":"iPXE + default local boot","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":43,"name":"iPXE + global default","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":44,"name":"iPXE + intermediate script","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":55,"name":"Jumpstart + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":34,"name":"Jumpstart + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":3,"name":"Jumpstart + default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":35,"name":"Junos + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":56,"name":"Junos + default SLAX","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":30,"name":"Junos + default ZTP config","template_kind_id":10,"template_kind_name":"ZTP","inherited":false},{"id":57,"name":"Kickstart + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":36,"name":"Kickstart + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":45,"name":"Kickstart + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":4,"name":"Kickstart + default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":8,"name":"Kickstart + default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":17,"name":"Kickstart + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":126,"name":"Kickstart + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":97,"name":"kickstart_ifcfg_bonded_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":95,"name":"kickstart_ifcfg_bond_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":99,"name":"kickstart_ifcfg_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":101,"name":"kickstart_ifcfg_get_identifier_names","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":102,"name":"kickstart_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":104,"name":"kickstart_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":103,"name":"kickstart_network_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":58,"name":"Kickstart + oVirt-RHVH","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":18,"name":"Kickstart + oVirt-RHVH PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":105,"name":"kickstart_rhsm","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":40,"name":"Linux + host_init_config default","template_kind_id":1,"template_kind_name":"host_init_config","inherited":false},{"id":106,"name":"ntp","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":1,"name":"NX-OS + default POAP setup","template_kind_id":11,"template_kind_name":"POAP","inherited":false},{"id":107,"name":"pkg_manager","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":108,"name":"preseed_autoinstall_clevis_tang_wrapper","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":127,"name":"Preseed + Autoinstall cloud-init user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":59,"name":"Preseed + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":37,"name":"Preseed + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":46,"name":"Preseed + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":47,"name":"Preseed + default iPXE Autoinstall","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":9,"name":"Preseed + default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":10,"name":"Preseed + default PXEGrub2 Autoinstall","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":19,"name":"Preseed + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":20,"name":"Preseed + default PXELinux Autoinstall","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":128,"name":"Preseed + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":109,"name":"preseed_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":111,"name":"preseed_kernel_options_autoinstall","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":113,"name":"preseed_netplan_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":114,"name":"preseed_netplan_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":115,"name":"preseed_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":116,"name":"puppet.conf","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":118,"name":"puppetlabs_repo","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":117,"name":"puppet_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":98,"name":"pxegrub2_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":11,"name":"PXEGrub2 + default local boot","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":96,"name":"pxegrub2_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":12,"name":"PXEGrub2 + global default","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":100,"name":"pxegrub2_mac","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":110,"name":"pxegrub_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":5,"name":"PXEGrub + default local boot","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":112,"name":"pxegrub_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":6,"name":"PXEGrub + global default","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":21,"name":"PXELinux + chain iPXE","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":22,"name":"PXELinux + chain iPXE UNDI","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":70,"name":"pxelinux_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":23,"name":"PXELinux + default local boot","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":24,"name":"PXELinux + default memdisk","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":72,"name":"pxelinux_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":25,"name":"PXELinux + global default","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":74,"name":"rancheros_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":60,"name":"RancherOS + provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":26,"name":"RancherOS + PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":119,"name":"redhat_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":66,"name":"remote_execution_pull_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":120,"name":"remote_execution_ssh_keys","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":121,"name":"saltstack_minion","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":122,"name":"saltstack_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":123,"name":"schedule_reboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":124,"name":"subscription_manager_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":129,"name":"UserData + default","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":130,"name":"UserData + open-vm-tools","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":27,"name":"WAIK + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":38,"name":"Windows + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":48,"name":"Windows + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":49,"name":"Windows + default iPXE httpboot","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":61,"name":"Windows + default provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":28,"name":"Windows + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":131,"name":"Windows + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":76,"name":"windows_network","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":68,"name":"Windows + peSetup.cmd","template_kind_id":8,"template_kind_name":"script","inherited":false},{"id":62,"name":"XenServer + default answerfile","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":39,"name":"XenServer + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":29,"name":"XenServer + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":94,"name":"yum_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false}],"domains":[{"id":4,"name":"test.invalid","inherited":false}],"realms":[],"hostgroups":[],"locations":[{"id":2,"name":"Default + Location","title":"Default Location","description":null}],"hosts_count":0,"parameters":[],"deprecations":{"environments":"Environments + got deprecated from this endpoint."}}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '2675' - content-security-policy: + Content-Length: + - '19581' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"8f57b0e8e6f05268ba2119503fb4c478-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=98 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=98 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - e3a682d3-43a9-47cb-9fd8-b2df7d4456c6 - x-runtime: - - '0.050641' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-3.yml b/tests/test_playbooks/fixtures/resource_info-3.yml index d230e798f4..41a3730033 100644 --- a/tests/test_playbooks/fixtures/resource_info-3.yml +++ b/tests/test_playbooks/fixtures/resource_info-3.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=0167d8d957fbfda5a2a4e53bc4b26f47; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 1f10448c-f2e9-483c-ac89-d49b7b38a1bc - x-runtime: - - '0.105797' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,51 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=0167d8d957fbfda5a2a4e53bc4b26f47 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations?per_page=4294967296&search=name%3D%22Facts+Organization%22 + uri: https://foreman.example.org/api/organizations?search=name%3D%22Facts+Organization%22&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-29 - 12:01:41 UTC\",\"updated_at\":\"2019-11-29 12:01:41 UTC\",\"id\":48,\"name\":\"Facts + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-09-10 + 09:43:48 UTC\",\"updated_at\":\"2024-09-10 09:43:48 UTC\",\"id\":6,\"name\":\"Facts Organization\",\"title\":\"Facts Organization\",\"description\":\"A test organization\"}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '416' - content-security-policy: + Content-Length: + - '415' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"aa4fd744f20c7214225557e6a00911ae-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - a6d6592f-9a38-4d5e-a1b6-776844cb05c1 - x-runtime: - - '0.015348' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -155,68 +120,50 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=0167d8d957fbfda5a2a4e53bc4b26f47 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations/48/domains?per_page=4294967296&search= + uri: https://foreman.example.org/api/organizations/6/domains?per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2019-11-29 - 12:01:42 UTC\",\"updated_at\":\"2019-11-29 12:01:42 UTC\",\"id\":13,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-09-10 + 09:43:49 UTC\",\"updated_at\":\"2024-09-10 09:43:49 UTC\",\"id\":5,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '308' - content-security-policy: + Content-Length: + - '309' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"6b83030626ae6723434e1a35470bb412-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: - - 48; Facts Organization - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=98 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_current_organization: + - 6; Facts Organization + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=98 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - bb3c4385-24f3-4082-a1b4-a18c4caaaf34 - x-runtime: - - '0.030504' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-4.yml b/tests/test_playbooks/fixtures/resource_info-4.yml index 83d24c6730..6fb71190d9 100644 --- a/tests/test_playbooks/fixtures/resource_info-4.yml +++ b/tests/test_playbooks/fixtures/resource_info-4.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=57e22429830a3888a1cee6f6b4927e9d; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - cb7813be-2c86-47a6-9106-df1f48b4c0a6 - x-runtime: - - '0.103520' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,51 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=57e22429830a3888a1cee6f6b4927e9d User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations?per_page=4294967296&search=name%3D%22Facts+Organization%22 + uri: https://foreman.example.org/api/organizations?search=name%3D%22Facts+Organization%22&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-29 - 12:01:41 UTC\",\"updated_at\":\"2019-11-29 12:01:41 UTC\",\"id\":48,\"name\":\"Facts + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-09-10 + 09:43:48 UTC\",\"updated_at\":\"2024-09-10 09:43:48 UTC\",\"id\":6,\"name\":\"Facts Organization\",\"title\":\"Facts Organization\",\"description\":\"A test organization\"}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '416' - content-security-policy: + Content-Length: + - '415' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:46 GMT - etag: - - W/"aa4fd744f20c7214225557e6a00911ae-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - e7bf5bd4-8691-4b76-a1e6-7a22c764670e - x-runtime: - - '0.016235' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-5.yml b/tests/test_playbooks/fixtures/resource_info-5.yml index 6131355e56..8e98e05509 100644 --- a/tests/test_playbooks/fixtures/resource_info-5.yml +++ b/tests/test_playbooks/fixtures/resource_info-5.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:46 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=2f16a9a9469b1af2a9c7a5378520836a; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 6c6386b0-0b3a-4781-802e-a65b03455651 - x-runtime: - - '0.103576' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,68 +62,50 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=2f16a9a9469b1af2a9c7a5378520836a User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations/48/domains?per_page=4294967296&search= + uri: https://foreman.example.org/api/organizations/6/domains?per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2019-11-29 - 12:01:42 UTC\",\"updated_at\":\"2019-11-29 12:01:42 UTC\",\"id\":13,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-09-10 + 09:43:49 UTC\",\"updated_at\":\"2024-09-10 09:43:49 UTC\",\"id\":5,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '308' - content-security-policy: + Content-Length: + - '309' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:46 GMT - etag: - - W/"6b83030626ae6723434e1a35470bb412-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: - - 48; Facts Organization - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_current_organization: + - 6; Facts Organization + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - f8716811-8a0f-470b-b53b-29e6bc179b9e - x-runtime: - - '0.030529' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-6.yml b/tests/test_playbooks/fixtures/resource_info-6.yml index 6079ed89d7..a2f9d57011 100644 --- a/tests/test_playbooks/fixtures/resource_info-6.yml +++ b/tests/test_playbooks/fixtures/resource_info-6.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:47 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=db59188effe0a762ff761883f5410c2e; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 08de75b2-017f-4b50-ade1-9424c7b88875 - x-runtime: - - '0.104098' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/resource_info.yml b/tests/test_playbooks/resource_info.yml index 131c22a7ee..7ae6992ee8 100644 --- a/tests/test_playbooks/resource_info.yml +++ b/tests/test_playbooks/resource_info.yml @@ -35,7 +35,7 @@ return_length: 1 - include_tasks: tasks/search_facts.yml vars: - resource: subnets + resource: http_proxies return_length: 0 - include_tasks: tasks/search_facts.yml vars: @@ -74,7 +74,7 @@ ignore_errors: true - fail: msg: "{{ result.msg }} should have contained all available resources" - when: "'config_groups' not in result.msg" + when: "'hostgroups' not in result.msg" - hosts: localhost collections: