From 8ff176de658f0973d3506386d841229415cb7071 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 25 Jul 2023 09:13:37 +0200 Subject: [PATCH] don't fail when removing a content credential from a repository --- .../fragments/bz2224122-repo-org-scope.yml | 2 + plugins/module_utils/foreman_helper.py | 2 + .../test_playbooks/fixtures/repository-0.yml | 78 ++-- .../test_playbooks/fixtures/repository-1.yml | 85 ++-- .../test_playbooks/fixtures/repository-10.yml | 89 +++-- .../test_playbooks/fixtures/repository-11.yml | 115 +++--- .../test_playbooks/fixtures/repository-12.yml | 89 +++-- .../test_playbooks/fixtures/repository-13.yml | 152 ++++++-- .../test_playbooks/fixtures/repository-14.yml | 120 ++++-- .../test_playbooks/fixtures/repository-15.yml | 94 ++--- .../test_playbooks/fixtures/repository-16.yml | 121 ++---- .../test_playbooks/fixtures/repository-17.yml | 157 +++----- .../test_playbooks/fixtures/repository-18.yml | 83 ++-- .../test_playbooks/fixtures/repository-19.yml | 363 ++++++++++++++++++ .../test_playbooks/fixtures/repository-2.yml | 107 +++--- .../test_playbooks/fixtures/repository-20.yml | 299 +++++++++++++++ .../test_playbooks/fixtures/repository-3.yml | 85 ++-- .../test_playbooks/fixtures/repository-4.yml | 107 +++--- .../test_playbooks/fixtures/repository-5.yml | 107 +++--- .../test_playbooks/fixtures/repository-6.yml | 107 +++--- .../test_playbooks/fixtures/repository-7.yml | 79 ++-- .../test_playbooks/fixtures/repository-8.yml | 54 +-- .../test_playbooks/fixtures/repository-9.yml | 158 ++++---- tests/test_playbooks/repository.yml | 22 ++ 24 files changed, 1680 insertions(+), 995 deletions(-) create mode 100644 changelogs/fragments/bz2224122-repo-org-scope.yml create mode 100644 tests/test_playbooks/fixtures/repository-19.yml create mode 100644 tests/test_playbooks/fixtures/repository-20.yml diff --git a/changelogs/fragments/bz2224122-repo-org-scope.yml b/changelogs/fragments/bz2224122-repo-org-scope.yml new file mode 100644 index 000000000..81b3cba30 --- /dev/null +++ b/changelogs/fragments/bz2224122-repo-org-scope.yml @@ -0,0 +1,2 @@ +bugfixes: + - repository - don't fail when removing a content credential from a repository (https://bugzilla.redhat.com/show_bug.cgi?id=2224122) diff --git a/plugins/module_utils/foreman_helper.py b/plugins/module_utils/foreman_helper.py index 454ce8982..83a952f1b 100644 --- a/plugins/module_utils/foreman_helper.py +++ b/plugins/module_utils/foreman_helper.py @@ -842,6 +842,8 @@ def lookup_entity(self, key, params=None): return result def _lookup_entity(self, identifier, entity_spec, params=None): + if identifier is NoEntity: + return NoEntity resource_type = entity_spec['resource_type'] failsafe = entity_spec.get('failsafe', False) thin = entity_spec.get('thin', True) diff --git a/tests/test_playbooks/fixtures/repository-0.yml b/tests/test_playbooks/fixtures/repository-0.yml index 27ad6dd24..949f5466c 100644 --- a/tests/test_playbooks/fixtures/repository-0.yml +++ b/tests/test_playbooks/fixtures/repository-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,13 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":0}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-06-23 + 11:37:27 UTC","last_sync_words":"about 1 month","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":1}]} ' headers: @@ -138,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '659' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,11 +183,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":1} ' headers: @@ -195,6 +195,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '195' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,7 +230,7 @@ interactions: message: OK - request: body: '{"name": "Test Repository", "label": "just_a_test_repo", "product_id": - 21, "content_type": "yum", "url": "https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/", + 1, "content_type": "yum", "url": "https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/", "mirroring_policy": "additive"}' headers: Accept: @@ -240,7 +240,7 @@ interactions: Connection: - keep-alive Content-Length: - - '196' + - '195' Content-Type: - application/json User-Agent: @@ -249,13 +249,13 @@ interactions: uri: https://foreman.example.org/katello/api/repositories response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:48 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:10 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -263,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2770' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -276,13 +278,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-1.yml b/tests/test_playbooks/fixtures/repository-1.yml index 064e08819..68abd57e8 100644 --- a/tests/test_playbooks/fixtures/repository-1.yml +++ b/tests/test_playbooks/fixtures/repository-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:27:49 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:10 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2c819ace-c082-462c-ac1e-83288ac7e673/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/191fc9bd-7708-4985-989f-049bc75a27b4/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1652' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,16 +244,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:48 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2c819ace-c082-462c-ac1e-83288ac7e673/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:10 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/191fc9bd-7708-4985-989f-049bc75a27b4/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -262,6 +261,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2808' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -275,13 +276,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-10.yml b/tests/test_playbooks/fixtures/repository-10.yml index 387c9ad2b..e5dfc6b74 100644 --- a/tests/test_playbooks/fixtures/repository-10.yml +++ b/tests/test_playbooks/fixtures/repository-10.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:28:03 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:50 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/d7892dc1-6ed2-46de-a905-1e639735b0f5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/61077244-12eb-44e4-a011-b2b0b0a15ec5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1660' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,18 +244,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/25 + uri: https://foreman.example.org/katello/api/repositories/8 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:02 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:01 UTC","updated_at":"2022-09-14 11:28:02 UTC","backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/d7892dc1-6ed2-46de-a905-1e639735b0f5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":3,"ssl_ca_cert_id":4,"ssl_client_cert_id":4,"ssl_client_key_id":4,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":4,"name":"Test - SSL Cert"},"ssl_client_cert":{"id":4,"name":"Test SSL Cert"},"ssl_client_key":{"id":4,"name":"Test - SSL Cert"},"gpg_key":{"id":3,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:04:49 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/61077244-12eb-44e4-a011-b2b0b0a15ec5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":4,"ssl_ca_cert_id":5,"ssl_client_cert_id":5,"ssl_client_key_id":5,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":5,"name":"Test + SSL Cert"},"ssl_client_cert":{"id":5,"name":"Test SSL Cert"},"ssl_client_key":{"id":5,"name":"Test + SSL Cert"},"gpg_key":{"id":4,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -264,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +278,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-11.yml b/tests/test_playbooks/fixtures/repository-11.yml index 98d98cf55..7e4a4d687 100644 --- a/tests/test_playbooks/fixtures/repository-11.yml +++ b/tests/test_playbooks/fixtures/repository-11.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:28:03 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:50 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/d7892dc1-6ed2-46de-a905-1e639735b0f5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/61077244-12eb-44e4-a011-b2b0b0a15ec5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1660' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,18 +244,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/25 + uri: https://foreman.example.org/katello/api/repositories/8 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:02 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:01 UTC","updated_at":"2022-09-14 11:28:02 UTC","backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/d7892dc1-6ed2-46de-a905-1e639735b0f5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":3,"ssl_ca_cert_id":4,"ssl_client_cert_id":4,"ssl_client_key_id":4,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":4,"name":"Test - SSL Cert"},"ssl_client_cert":{"id":4,"name":"Test SSL Cert"},"ssl_client_key":{"id":4,"name":"Test - SSL Cert"},"gpg_key":{"id":3,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:04:49 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/61077244-12eb-44e4-a011-b2b0b0a15ec5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":4,"ssl_ca_cert_id":5,"ssl_client_cert_id":5,"ssl_client_key_id":5,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":5,"name":"Test + SSL Cert"},"ssl_client_cert":{"id":5,"name":"Test SSL Cert"},"ssl_client_key":{"id":5,"name":"Test + SSL Cert"},"gpg_key":{"id":4,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -264,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +278,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -313,18 +312,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/repositories/25 + uri: https://foreman.example.org/katello/api/repositories/8 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:02 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:01 UTC","updated_at":"2022-09-14 11:28:04 UTC","backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/d7892dc1-6ed2-46de-a905-1e639735b0f5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":3,"ssl_ca_cert_id":4,"ssl_client_cert_id":4,"ssl_client_key_id":4,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":4,"name":"Test - SSL Cert"},"ssl_client_cert":{"id":4,"name":"Test SSL Cert"},"ssl_client_key":{"id":4,"name":"Test - SSL Cert"},"gpg_key":{"id":3,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:04:54 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/61077244-12eb-44e4-a011-b2b0b0a15ec5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":4,"ssl_ca_cert_id":5,"ssl_client_cert_id":5,"ssl_client_key_id":5,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":5,"name":"Test + SSL Cert"},"ssl_client_cert":{"id":5,"name":"Test SSL Cert"},"ssl_client_key":{"id":5,"name":"Test + SSL Cert"},"gpg_key":{"id":4,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -332,6 +331,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2844' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -345,13 +346,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-12.yml b/tests/test_playbooks/fixtures/repository-12.yml index 9c7cfb58d..019c9921f 100644 --- a/tests/test_playbooks/fixtures/repository-12.yml +++ b/tests/test_playbooks/fixtures/repository-12.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:28:06 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:59 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/dfcbc90c-6dc0-4160-a88d-8f44897ac141/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/1dce976a-2641-4376-887e-7ed44f6fd216/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1671' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,18 +244,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/25 + uri: https://foreman.example.org/katello/api/repositories/8 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:02 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:01 UTC","updated_at":"2022-09-14 11:28:04 UTC","backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/dfcbc90c-6dc0-4160-a88d-8f44897ac141/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":3,"ssl_ca_cert_id":4,"ssl_client_cert_id":4,"ssl_client_key_id":4,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":4,"name":"Test - SSL Cert"},"ssl_client_cert":{"id":4,"name":"Test SSL Cert"},"ssl_client_key":{"id":4,"name":"Test - SSL Cert"},"gpg_key":{"id":3,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:04:54 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/1dce976a-2641-4376-887e-7ed44f6fd216/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":4,"ssl_ca_cert_id":5,"ssl_client_cert_id":5,"ssl_client_key_id":5,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":5,"name":"Test + SSL Cert"},"ssl_client_cert":{"id":5,"name":"Test SSL Cert"},"ssl_client_key":{"id":5,"name":"Test + SSL Cert"},"gpg_key":{"id":4,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -264,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2844' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +278,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-13.yml b/tests/test_playbooks/fixtures/repository-13.yml index eea9a14e1..aa8eb151c 100644 --- a/tests/test_playbooks/fixtures/repository-13.yml +++ b/tests/test_playbooks/fixtures/repository-13.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:28:06 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:59 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":"/pulp/api/v3/publications/rpm/rpm/dfcbc90c-6dc0-4160-a88d-8f44897ac141/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/1dce976a-2641-4376-887e-7ed44f6fd216/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1671' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -242,15 +241,21 @@ interactions: - 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/repositories/25 + method: GET + uri: https://foreman.example.org/katello/api/repositories/8 response: body: - string: ' {} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:04:54 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/1dce976a-2641-4376-887e-7ed44f6fd216/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":4,"ssl_ca_cert_id":5,"ssl_client_cert_id":5,"ssl_client_key_id":5,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":5,"name":"Test + SSL Cert"},"ssl_client_cert":{"id":5,"name":"Test SSL Cert"},"ssl_client_key":{"id":5,"name":"Test + SSL Cert"},"gpg_key":{"id":4,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -258,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2844' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -271,13 +278,78 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 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: 200 + message: OK +- request: + body: '{"gpg_key_id": null, "ssl_ca_cert_id": null, "ssl_client_cert_id": null, + "ssl_client_key_id": null}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: PUT + uri: https://foreman.example.org/katello/api/repositories/8 + response: + body: + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:05:03 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/1dce976a-2641-4376-887e-7ed44f6fd216/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2825' + Content-Security-Policy: + - 'default-src ''self''; 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.7.0 + Keep-Alive: + - timeout=15, max=95 + Strict-Transport-Security: + - max-age=631139040; includeSubdomains X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-14.yml b/tests/test_playbooks/fixtures/repository-14.yml index 17cdecdf3..580ef1e92 100644 --- a/tests/test_playbooks/fixtures/repository-14.yml +++ b/tests/test_playbooks/fixtures/repository-14.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,13 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":0}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:05:07 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -138,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,11 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository 2\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/99b58f4a-2ba3-4d64-97b7-e28a50d6066c/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -195,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1671' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +214,73 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 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: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/repositories/8 + response: + body: + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:05:03 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/99b58f4a-2ba3-4d64-97b7-e28a50d6066c/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2825' + Content-Security-Policy: + - 'default-src ''self''; 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.7.0 + Keep-Alive: + - timeout=15, max=96 + Strict-Transport-Security: + - max-age=631139040; includeSubdomains X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-15.yml b/tests/test_playbooks/fixtures/repository-15.yml index e0c127b9c..32c4150ef 100644 --- a/tests/test_playbooks/fixtures/repository-15.yml +++ b/tests/test_playbooks/fixtures/repository-15.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,13 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":0}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:05:07 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -138,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,11 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/99b58f4a-2ba3-4d64-97b7-e28a50d6066c/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -195,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1671' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -229,9 +233,7 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Docker Repository", "label": "just_a_test_repo", "product_id": - 21, "content_type": "docker", "url": "https://docker.io", "docker_upstream_name": - "busybox", "include_tags": ["latest"]}' + body: null headers: Accept: - application/json;version=2 @@ -240,22 +242,20 @@ interactions: Connection: - keep-alive Content-Length: - - '198' - Content-Type: - - application/json + - '0' User-Agent: - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/katello/api/repositories + method: DELETE + uri: https://foreman.example.org/katello/api/repositories/8 response: body: - string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:10 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:10 UTC","updated_at":"2022-09-14 11:28:11 UTC","backend_identifier":"5b66b707-8e93-47c7-a9b4-628b447a4019","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-5.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/7e36ddc8-37ad-4c2c-bc23-068e85c9280a/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/d2a45bdf-015d-4335-85f5-69899fb6a7a0/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":26,"name":"Test - Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1663154890793","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:05:03 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":"/pulp/api/v3/publications/rpm/rpm/99b58f4a-2ba3-4d64-97b7-e28a50d6066c/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":null,"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -263,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2810' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -276,13 +278,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -294,6 +294,6 @@ interactions: X-XSS-Protection: - 1; mode=block status: - code: 201 - message: Created + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/repository-16.yml b/tests/test_playbooks/fixtures/repository-16.yml index 7548c3610..cbaac9fb8 100644 --- a/tests/test_playbooks/fixtures/repository-16.yml +++ b/tests/test_playbooks/fixtures/repository-16.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:28:10 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-06-23 + 11:37:27 UTC","last_sync_words":"about 1 month","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":1}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '659' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"5b66b707-8e93-47c7-a9b4-628b447a4019","relative_path":"test_organization-test_product-just_a_test_repo","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-5.tanso.example.com/test_organization-test_product-just_a_test_repo","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/container/container/7e36ddc8-37ad-4c2c-bc23-068e85c9280a/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/d2a45bdf-015d-4335-85f5-69899fb6a7a0/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":26,"name":"Test - Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1663154890793","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":1} ' headers: @@ -200,6 +195,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '197' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,75 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 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: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/repositories/26 - response: - body: - string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:10 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:10 UTC","updated_at":"2022-09-14 11:28:11 UTC","backend_identifier":"5b66b707-8e93-47c7-a9b4-628b447a4019","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-5.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/7e36ddc8-37ad-4c2c-bc23-068e85c9280a/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/d2a45bdf-015d-4335-85f5-69899fb6a7a0/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":26,"name":"Test - Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1663154890793","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} - - ' - 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: - - 3.3.0 - Keep-Alive: - - timeout=15, max=96 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-17.yml b/tests/test_playbooks/fixtures/repository-17.yml index 0fe3023d3..e87d067e7 100644 --- a/tests/test_playbooks/fixtures/repository-17.yml +++ b/tests/test_playbooks/fixtures/repository-17.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:28:10 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-06-23 + 11:37:27 UTC","last_sync_words":"about 1 month","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":1}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '659' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"5b66b707-8e93-47c7-a9b4-628b447a4019","relative_path":"test_organization-test_product-just_a_test_repo","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-5.tanso.example.com/test_organization-test_product-just_a_test_repo","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/container/container/7e36ddc8-37ad-4c2c-bc23-068e85c9280a/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/d2a45bdf-015d-4335-85f5-69899fb6a7a0/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":26,"name":"Test - Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1663154890793","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":1} ' headers: @@ -200,6 +195,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '202' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,75 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 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: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/repositories/26 - response: - body: - string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:10 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:10 UTC","updated_at":"2022-09-14 11:28:11 UTC","backend_identifier":"5b66b707-8e93-47c7-a9b4-628b447a4019","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-5.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/7e36ddc8-37ad-4c2c-bc23-068e85c9280a/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/d2a45bdf-015d-4335-85f5-69899fb6a7a0/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":26,"name":"Test - Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1663154890793","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} - - ' - 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: - - 3.3.0 - Keep-Alive: - - timeout=15, max=96 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -296,7 +229,9 @@ interactions: code: 200 message: OK - request: - body: '{"upstream_username": "dockeruser", "upstream_password": "dockerpass"}' + body: '{"name": "Test Docker Repository", "label": "just_a_test_repo", "product_id": + 1, "content_type": "docker", "url": "https://docker.io", "docker_upstream_name": + "busybox", "include_tags": ["latest"]}' headers: Accept: - application/json;version=2 @@ -305,22 +240,22 @@ interactions: Connection: - keep-alive Content-Length: - - '70' + - '197' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: PUT - uri: https://foreman.example.org/katello/api/repositories/26 + method: POST + uri: https://foreman.example.org/katello/api/repositories response: body: - string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:10 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:10 UTC","updated_at":"2022-09-14 11:28:13 UTC","backend_identifier":"5b66b707-8e93-47c7-a9b4-628b447a4019","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-5.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/7e36ddc8-37ad-4c2c-bc23-068e85c9280a/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/d2a45bdf-015d-4335-85f5-69899fb6a7a0/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":26,"name":"Test - Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1663154890793","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":"dockeruser","deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":true,"upstream_auth_exists":true} + string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:05:21 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:05:20 UTC","updated_at":"2023-07-26 13:05:22 UTC","backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -328,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2791' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +278,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - - timeout=15, max=95 + - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -359,6 +294,6 @@ interactions: X-XSS-Protection: - 1; mode=block status: - code: 200 - message: OK + code: 201 + message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/repository-18.yml b/tests/test_playbooks/fixtures/repository-18.yml index 02dabc674..41ea6a36d 100644 --- a/tests/test_playbooks/fixtures/repository-18.yml +++ b/tests/test_playbooks/fixtures/repository-18.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:28:10 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:05:21 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"5b66b707-8e93-47c7-a9b4-628b447a4019","relative_path":"test_organization-test_product-just_a_test_repo","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-5.tanso.example.com/test_organization-test_product-just_a_test_repo","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/container/container/7e36ddc8-37ad-4c2c-bc23-068e85c9280a/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/d2a45bdf-015d-4335-85f5-69899fb6a7a0/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":26,"name":"Test - Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1663154890793","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","relative_path":"test_organization-test_product-just_a_test_repo","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1586' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -242,15 +241,19 @@ interactions: - 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/repositories/26 + method: GET + uri: https://foreman.example.org/katello/api/repositories/9 response: body: - string: ' {} + string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:05:21 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:05:20 UTC","updated_at":"2023-07-26 13:05:22 UTC","backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -258,6 +261,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2760' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -271,13 +276,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-19.yml b/tests/test_playbooks/fixtures/repository-19.yml new file mode 100644 index 000000000..56830e3e4 --- /dev/null +++ b/tests/test_playbooks/fixtures/repository-19.yml @@ -0,0 +1,363 @@ +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":"3.7.0","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '62' + Content-Security-Policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + 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.7.0 + 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) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '388' + Content-Security-Policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.7.0 + 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) + method: GET + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:05:21 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '664' + Content-Security-Policy: + - 'default-src ''self''; 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: + - 3; Test Organization + Foreman_version: + - 3.7.0 + 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) + method: GET + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 + response: + body: + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","relative_path":"test_organization-test_product-just_a_test_repo","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1586' + Content-Security-Policy: + - 'default-src ''self''; 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.7.0 + 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) + method: GET + uri: https://foreman.example.org/katello/api/repositories/9 + response: + body: + string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:05:21 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:05:20 UTC","updated_at":"2023-07-26 13:05:22 UTC","backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2760' + Content-Security-Policy: + - 'default-src ''self''; 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.7.0 + 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: '{"upstream_username": "dockeruser", "upstream_password": "dockerpass"}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: PUT + uri: https://foreman.example.org/katello/api/repositories/9 + response: + body: + string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:05:21 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:05:20 UTC","updated_at":"2023-07-26 13:05:28 UTC","backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":"dockeruser","deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":true,"upstream_auth_exists":true} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2766' + Content-Security-Policy: + - 'default-src ''self''; 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.7.0 + 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 +version: 1 diff --git a/tests/test_playbooks/fixtures/repository-2.yml b/tests/test_playbooks/fixtures/repository-2.yml index ef567ee5a..86ade69ed 100644 --- a/tests/test_playbooks/fixtures/repository-2.yml +++ b/tests/test_playbooks/fixtures/repository-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:27:49 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:10 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2c819ace-c082-462c-ac1e-83288ac7e673/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/191fc9bd-7708-4985-989f-049bc75a27b4/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1652' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,16 +244,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:48 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2c819ace-c082-462c-ac1e-83288ac7e673/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:10 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/191fc9bd-7708-4985-989f-049bc75a27b4/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -262,6 +261,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2808' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -275,13 +276,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -311,16 +310,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:50 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2c819ace-c082-462c-ac1e-83288ac7e673/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:15 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/191fc9bd-7708-4985-989f-049bc75a27b4/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -328,6 +327,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2819' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +342,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-20.yml b/tests/test_playbooks/fixtures/repository-20.yml new file mode 100644 index 000000000..293f5ba7e --- /dev/null +++ b/tests/test_playbooks/fixtures/repository-20.yml @@ -0,0 +1,299 @@ +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":"3.7.0","api_version":2}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '62' + Content-Security-Policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + 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.7.0 + 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) + method: GET + uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 + response: + body: + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '388' + Content-Security-Policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.7.0 + 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) + method: GET + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:05:21 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '664' + Content-Security-Policy: + - 'default-src ''self''; 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: + - 3; Test Organization + Foreman_version: + - 3.7.0 + 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) + method: GET + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Docker+Repository%22&per_page=4294967296 + response: + body: + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Docker Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","relative_path":"test_organization-test_product-just_a_test_repo","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1586' + Content-Security-Policy: + - 'default-src ''self''; 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.7.0 + 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 + Content-Length: + - '0' + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: DELETE + uri: https://foreman.example.org/katello/api/repositories/9 + response: + body: + string: ' {"relative_path":"test_organization-test_product-just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:05:21 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:05:20 UTC","updated_at":"2023-07-26 13:05:28 UTC","backend_identifier":"35290fc5-7e87-48d4-94b7-27d92f4d44ec","container_repository_name":"test_organization-test_product-just_a_test_repo","full_path":"centos8-stream-katello-4-9.tanso.example.com/test_organization-test_product-just_a_test_repo","version_href":"/pulp/api/v3/repositories/container/container/444a3a71-c664-444e-8de8-50fb7d0dcf88/versions/0/","remote_href":"/pulp/api/v3/remotes/container/container/234e6c24-e568-4ae5-b53c-05b3ae06d5b5/","publication_href":null,"content_counts":{"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Test + Docker Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1690376721395","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":null,"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"include_tags":["latest"],"exclude_tags":["*-source"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":"dockeruser","deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":true,"upstream_auth_exists":true,"content_view_environments":[]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2752' + Content-Security-Policy: + - 'default-src ''self''; 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.7.0 + 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/repository-3.yml b/tests/test_playbooks/fixtures/repository-3.yml index ec241d683..daa03197b 100644 --- a/tests/test_playbooks/fixtures/repository-3.yml +++ b/tests/test_playbooks/fixtures/repository-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:27:52 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:19 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/af843a23-5b25-4a55-a1f7-a997996386bb/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/6739fd9d-33bf-472f-b33f-5f775b731005/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1663' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,16 +244,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:50 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/af843a23-5b25-4a55-a1f7-a997996386bb/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:15 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/6739fd9d-33bf-472f-b33f-5f775b731005/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -262,6 +261,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2819' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -275,13 +276,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-4.yml b/tests/test_playbooks/fixtures/repository-4.yml index e045451c6..acf02fc24 100644 --- a/tests/test_playbooks/fixtures/repository-4.yml +++ b/tests/test_playbooks/fixtures/repository-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:27:52 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:19 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/af843a23-5b25-4a55-a1f7-a997996386bb/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/6739fd9d-33bf-472f-b33f-5f775b731005/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1663' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,16 +244,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:50 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/af843a23-5b25-4a55-a1f7-a997996386bb/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:15 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/6739fd9d-33bf-472f-b33f-5f775b731005/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -262,6 +261,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2819' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -275,13 +276,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -311,16 +310,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:53 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/af843a23-5b25-4a55-a1f7-a997996386bb/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:24 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/6739fd9d-33bf-472f-b33f-5f775b731005/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -328,6 +327,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2806' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +342,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-5.yml b/tests/test_playbooks/fixtures/repository-5.yml index 684a37a6e..61e601b89 100644 --- a/tests/test_playbooks/fixtures/repository-5.yml +++ b/tests/test_playbooks/fixtures/repository-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:27:52 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:28 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/4768a29a-a923-4614-a454-e95184509389/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/12fb23cb-a758-4187-ae95-de6b3e4bab2b/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1650' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,16 +244,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:53 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/4768a29a-a923-4614-a454-e95184509389/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:24 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/12fb23cb-a758-4187-ae95-de6b3e4bab2b/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -262,6 +261,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2806' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -275,13 +276,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -311,16 +310,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:55 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/4768a29a-a923-4614-a454-e95184509389/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:31 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/12fb23cb-a758-4187-ae95-de6b3e4bab2b/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -328,6 +327,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2806' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +342,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-6.yml b/tests/test_playbooks/fixtures/repository-6.yml index 1bf32081c..2dfdd0ae0 100644 --- a/tests/test_playbooks/fixtures/repository-6.yml +++ b/tests/test_playbooks/fixtures/repository-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:27:55 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:36 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/3852dedd-0ce1-4d2d-b74f-6e2ad7b60ffe/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2ff1d94b-4ec5-4a1b-ad0d-317d3e63354a/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1650' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,16 +244,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:55 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/3852dedd-0ce1-4d2d-b74f-6e2ad7b60ffe/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:31 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2ff1d94b-4ec5-4a1b-ad0d-317d3e63354a/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -262,6 +261,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2806' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -275,13 +276,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -311,16 +310,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:27:48 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:47 UTC","updated_at":"2022-09-14 11:27:55 UTC","backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/3852dedd-0ce1-4d2d-b74f-6e2ad7b60ffe/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:31 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2ff1d94b-4ec5-4a1b-ad0d-317d3e63354a/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: @@ -328,6 +327,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2806' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +342,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-7.yml b/tests/test_playbooks/fixtures/repository-7.yml index 6b3c57590..11b0c4dcb 100644 --- a/tests/test_playbooks/fixtures/repository-7.yml +++ b/tests/test_playbooks/fixtures/repository-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,14 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2022-09-14 - 11:27:57 UTC","last_sync_words":"less than a minute","organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":1}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-07-26 + 13:04:36 UTC","last_sync_words":"less than a minute","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} ' headers: @@ -139,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '664' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,15 +183,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"9fc32a80-a890-4913-b134-068ffaaef538","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/e00a11c1-2b5c-4141-99e5-5bab7e580892/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/62d4611d-4ae6-4c27-b6a2-60b92fed52f8/","publication_href":"/pulp/api/v3/publications/rpm/rpm/3852dedd-0ce1-4d2d-b74f-6e2ad7b60ffe/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":24,"name":"Test - Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1663154868357","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2ff1d94b-4ec5-4a1b-ad0d-317d3e63354a/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","last_sync_words":null}],"org_repository_count":2} ' headers: @@ -200,6 +199,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1650' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -247,10 +246,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/repositories/24 + uri: https://foreman.example.org/katello/api/repositories/7 response: body: - string: ' {} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:09 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:08 UTC","updated_at":"2023-07-26 13:04:31 UTC","backend_identifier":"d834ed96-f974-43a7-891c-9efcb358fe0b","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo/","version_href":"/pulp/api/v3/repositories/rpm/rpm/45e870d8-eaaa-4b5b-a486-a0579ea295a9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/ebfd859f-5ad8-423b-9875-daccce87ee33/","publication_href":"/pulp/api/v3/publications/rpm/rpm/2ff1d94b-4ec5-4a1b-ad0d-317d3e63354a/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":7,"name":"Test + Repository","label":"just_a_test_repo","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://localhost/pulp/repos/demo_repos/zoo","arch":"noarch","os_versions":[],"content_id":"1690376649234","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":null,"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -258,6 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2792' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -271,13 +278,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-8.yml b/tests/test_playbooks/fixtures/repository-8.yml index 560caca52..a65aa6aaf 100644 --- a/tests/test_playbooks/fixtures/repository-8.yml +++ b/tests/test_playbooks/fixtures/repository-8.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,13 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":0}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-06-23 + 11:37:27 UTC","last_sync_words":"about 1 month","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":1}]} ' headers: @@ -138,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '659' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,11 +183,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":1} ' headers: @@ -195,6 +195,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '195' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/repository-9.yml b/tests/test_playbooks/fixtures/repository-9.yml index 4415ef83e..aac3dd404 100644 --- a/tests/test_playbooks/fixtures/repository-9.yml +++ b/tests/test_playbooks/fixtures/repository-9.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.3.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.7.0","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '62' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -68,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2022-09-14 11:27:41 UTC\",\"updated_at\"\ - :\"2022-09-14 11:27:43 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-06-23 + 11:37:20 UTC\",\"updated_at\":\"2023-06-23 11:37:22 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,13 +123,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/6/products?search=name%3D%22Test+Product%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Test+Product%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"160566138145","name":"Test - Product","label":"Test_Product","description":"A happy little test product","provider_id":9,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"sync_plan":null,"repository_count":0}]} + Product\"","sort":{"by":"name","order":"asc"},"results":[{"id":1,"cp_id":"830157316014","name":"Test + Product","label":"Test_Product","description":"A happy little test product","provider_id":3,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-06-23 + 11:37:27 UTC","last_sync_words":"about 1 month","organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":1}]} ' headers: @@ -138,6 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '659' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,15 +151,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,16 +183,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_credentials?organization_id=6&search=name%3D%22Test+GPG+key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/content_credentials?organization_id=3&search=name%3D%22Test+GPG+key%22&per_page=4294967296 response: body: string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test GPG key\"","sort":{"by":"name","order":"asc"},"results":[{"name":"Test GPG - key","content_type":"gpg_key","content":"-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: - GnuPG v1.4.5 (GNU/Linux)\n\nmQENBFVMupABCAC9AiPd5+NBtEed8BG4hf4dt94dqJ4B+Lnnv7sVdoqO3tNHA8GW\nQayAPQRN+kAkCzZ+BoqMi7rKTwMyRvUGBpkFhuVCRbQdDIJuvP1S8liP42sPMhVY\n+mb7frXQE7EUZ0MH7PfxrvgcxiFi/awmBjQZkrYYbiYZPc7NJFshoJeLe5f6ZXqX\nm9GoX5MVxwC4iRNrHxQKTywvxTURt4wTx4+ZipUmrAjUcknW+g/try61dHJhLCWi\nqH8QYZLNnSgmbK9y8BoL0wxDTeos8sGbvVSd1sVoTiktyGOROjEAUlzC7PhUMjLF\nX9ECWS2q7NoysmheJwVeZxzMxXfvg83HoLyjABEBAAG0JkthdGVsbG8gPGZvcmVt\nYW4tZGV2QGdvb2dsZWdyb3Vwcy5jb20+iQE8BBMBAgAmBQJVTLqQAhsDBQkFo5qA\nBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCC1M07xi0T/8+Af/b4KfwT51wFWm\n3bN/LVEYKrfSE32PnlxAVX3jY+eSRnf3Cah+QH5eAGtDIn+hb2JXr5K+CEBnmupS\nRp57oZJQnqjxK4BRY2WstABxjSXG1gx8iC/vLq6dUV3lK5LSe9hfmXMKr3vos1x1\nb2ehiNstDj264aByokU9R9J3FDtwiEc/xaA7x66SSkWILYtRBYzUlu+lUmox3wJw\n0bCCWPF9PV0IpmzSKwqHLqaV985HtVovH34n//vQiMVnVmXYiiN5WQUrJs5VBmwy\nzXXOdEGqVA/0n4y7nG+hpFWgNb2G0/eSrIg4XWseMYXIc4tJF8zX0dU263A8fP/Q\neyRp696I2g==\n=5p62\n-----END - PGP PUBLIC KEY BLOCK-----","id":3,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:44 UTC","updated_at":"2022-09-14 11:27:44 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} + key","content_type":"gpg_key","content":"key","id":4,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 12:27:28 UTC","updated_at":"2023-07-26 12:27:28 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_alternate_content_sources":[],"ssl_client_alternate_content_sources":[],"ssl_key_alternate_content_sources":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} ' headers: @@ -200,6 +198,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '829' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -211,15 +211,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,16 +243,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_credentials?organization_id=6&search=name%3D%22Test+SSL+Cert%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/content_credentials?organization_id=3&search=name%3D%22Test+SSL+Cert%22&per_page=4294967296 response: body: string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test SSL Cert\"","sort":{"by":"name","order":"asc"},"results":[{"name":"Test SSL - Cert","content_type":"cert","content":"-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: - GnuPG v1.4.5 (GNU/Linux)\n\nmQENBFVMupABCAC9AiPd5+NBtEed8BG4hf4dt94dqJ4B+Lnnv7sVdoqO3tNHA8GW\nQayAPQRN+kAkCzZ+BoqMi7rKTwMyRvUGBpkFhuVCRbQdDIJuvP1S8liP42sPMhVY\n+mb7frXQE7EUZ0MH7PfxrvgcxiFi/awmBjQZkrYYbiYZPc7NJFshoJeLe5f6ZXqX\nm9GoX5MVxwC4iRNrHxQKTywvxTURt4wTx4+ZipUmrAjUcknW+g/try61dHJhLCWi\nqH8QYZLNnSgmbK9y8BoL0wxDTeos8sGbvVSd1sVoTiktyGOROjEAUlzC7PhUMjLF\nX9ECWS2q7NoysmheJwVeZxzMxXfvg83HoLyjABEBAAG0JkthdGVsbG8gPGZvcmVt\nYW4tZGV2QGdvb2dsZWdyb3Vwcy5jb20+iQE8BBMBAgAmBQJVTLqQAhsDBQkFo5qA\nBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCC1M07xi0T/8+Af/b4KfwT51wFWm\n3bN/LVEYKrfSE32PnlxAVX3jY+eSRnf3Cah+QH5eAGtDIn+hb2JXr5K+CEBnmupS\nRp57oZJQnqjxK4BRY2WstABxjSXG1gx8iC/vLq6dUV3lK5LSe9hfmXMKr3vos1x1\nb2ehiNstDj264aByokU9R9J3FDtwiEc/xaA7x66SSkWILYtRBYzUlu+lUmox3wJw\n0bCCWPF9PV0IpmzSKwqHLqaV985HtVovH34n//vQiMVnVmXYiiN5WQUrJs5VBmwy\nzXXOdEGqVA/0n4y7nG+hpFWgNb2G0/eSrIg4XWseMYXIc4tJF8zX0dU263A8fP/Q\neyRp696I2g==\n=5p62\n-----END - PGP PUBLIC KEY BLOCK-----","id":4,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:44 UTC","updated_at":"2022-09-14 11:27:44 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} + Cert","content_type":"cert","content":"key","id":5,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 12:27:29 UTC","updated_at":"2023-07-26 12:27:29 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_alternate_content_sources":[],"ssl_client_alternate_content_sources":[],"ssl_key_alternate_content_sources":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} ' headers: @@ -262,6 +258,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '828' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -273,15 +271,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -307,16 +303,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_credentials?organization_id=6&search=name%3D%22Test+SSL+Cert%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/content_credentials?organization_id=3&search=name%3D%22Test+SSL+Cert%22&per_page=4294967296 response: body: string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test SSL Cert\"","sort":{"by":"name","order":"asc"},"results":[{"name":"Test SSL - Cert","content_type":"cert","content":"-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: - GnuPG v1.4.5 (GNU/Linux)\n\nmQENBFVMupABCAC9AiPd5+NBtEed8BG4hf4dt94dqJ4B+Lnnv7sVdoqO3tNHA8GW\nQayAPQRN+kAkCzZ+BoqMi7rKTwMyRvUGBpkFhuVCRbQdDIJuvP1S8liP42sPMhVY\n+mb7frXQE7EUZ0MH7PfxrvgcxiFi/awmBjQZkrYYbiYZPc7NJFshoJeLe5f6ZXqX\nm9GoX5MVxwC4iRNrHxQKTywvxTURt4wTx4+ZipUmrAjUcknW+g/try61dHJhLCWi\nqH8QYZLNnSgmbK9y8BoL0wxDTeos8sGbvVSd1sVoTiktyGOROjEAUlzC7PhUMjLF\nX9ECWS2q7NoysmheJwVeZxzMxXfvg83HoLyjABEBAAG0JkthdGVsbG8gPGZvcmVt\nYW4tZGV2QGdvb2dsZWdyb3Vwcy5jb20+iQE8BBMBAgAmBQJVTLqQAhsDBQkFo5qA\nBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCC1M07xi0T/8+Af/b4KfwT51wFWm\n3bN/LVEYKrfSE32PnlxAVX3jY+eSRnf3Cah+QH5eAGtDIn+hb2JXr5K+CEBnmupS\nRp57oZJQnqjxK4BRY2WstABxjSXG1gx8iC/vLq6dUV3lK5LSe9hfmXMKr3vos1x1\nb2ehiNstDj264aByokU9R9J3FDtwiEc/xaA7x66SSkWILYtRBYzUlu+lUmox3wJw\n0bCCWPF9PV0IpmzSKwqHLqaV985HtVovH34n//vQiMVnVmXYiiN5WQUrJs5VBmwy\nzXXOdEGqVA/0n4y7nG+hpFWgNb2G0/eSrIg4XWseMYXIc4tJF8zX0dU263A8fP/Q\neyRp696I2g==\n=5p62\n-----END - PGP PUBLIC KEY BLOCK-----","id":4,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:44 UTC","updated_at":"2022-09-14 11:27:44 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} + Cert","content_type":"cert","content":"key","id":5,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 12:27:29 UTC","updated_at":"2023-07-26 12:27:29 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_alternate_content_sources":[],"ssl_client_alternate_content_sources":[],"ssl_key_alternate_content_sources":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} ' headers: @@ -324,6 +318,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '828' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -335,15 +331,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -369,16 +363,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_credentials?organization_id=6&search=name%3D%22Test+SSL+Cert%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/content_credentials?organization_id=3&search=name%3D%22Test+SSL+Cert%22&per_page=4294967296 response: body: string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test SSL Cert\"","sort":{"by":"name","order":"asc"},"results":[{"name":"Test SSL - Cert","content_type":"cert","content":"-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: - GnuPG v1.4.5 (GNU/Linux)\n\nmQENBFVMupABCAC9AiPd5+NBtEed8BG4hf4dt94dqJ4B+Lnnv7sVdoqO3tNHA8GW\nQayAPQRN+kAkCzZ+BoqMi7rKTwMyRvUGBpkFhuVCRbQdDIJuvP1S8liP42sPMhVY\n+mb7frXQE7EUZ0MH7PfxrvgcxiFi/awmBjQZkrYYbiYZPc7NJFshoJeLe5f6ZXqX\nm9GoX5MVxwC4iRNrHxQKTywvxTURt4wTx4+ZipUmrAjUcknW+g/try61dHJhLCWi\nqH8QYZLNnSgmbK9y8BoL0wxDTeos8sGbvVSd1sVoTiktyGOROjEAUlzC7PhUMjLF\nX9ECWS2q7NoysmheJwVeZxzMxXfvg83HoLyjABEBAAG0JkthdGVsbG8gPGZvcmVt\nYW4tZGV2QGdvb2dsZWdyb3Vwcy5jb20+iQE8BBMBAgAmBQJVTLqQAhsDBQkFo5qA\nBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCC1M07xi0T/8+Af/b4KfwT51wFWm\n3bN/LVEYKrfSE32PnlxAVX3jY+eSRnf3Cah+QH5eAGtDIn+hb2JXr5K+CEBnmupS\nRp57oZJQnqjxK4BRY2WstABxjSXG1gx8iC/vLq6dUV3lK5LSe9hfmXMKr3vos1x1\nb2ehiNstDj264aByokU9R9J3FDtwiEc/xaA7x66SSkWILYtRBYzUlu+lUmox3wJw\n0bCCWPF9PV0IpmzSKwqHLqaV985HtVovH34n//vQiMVnVmXYiiN5WQUrJs5VBmwy\nzXXOdEGqVA/0n4y7nG+hpFWgNb2G0/eSrIg4XWseMYXIc4tJF8zX0dU263A8fP/Q\neyRp696I2g==\n=5p62\n-----END - PGP PUBLIC KEY BLOCK-----","id":4,"organization_id":6,"organization":{"name":"Test - Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:27:44 UTC","updated_at":"2022-09-14 11:27:44 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} + Cert","content_type":"cert","content":"key","id":5,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 12:27:29 UTC","updated_at":"2023-07-26 12:27:29 UTC","gpg_key_products":[],"gpg_key_repos":[],"ssl_ca_alternate_content_sources":[],"ssl_client_alternate_content_sources":[],"ssl_key_alternate_content_sources":[],"ssl_ca_products":[],"ssl_ca_root_repos":[],"ssl_client_products":[],"ssl_client_root_repos":[],"ssl_key_products":[],"ssl_key_root_repos":[],"permissions":{"view_content_credenials":true,"edit_content_credenials":true,"destroy_content_credenials":true}}]} ' headers: @@ -386,6 +378,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '828' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -397,15 +391,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 6; Test Organization + - 3; Test Organization Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -431,11 +423,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/21/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/1/repositories?search=name%3D%22Test+Repository+2%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test - Repository 2\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Test + Repository 2\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":1} ' headers: @@ -443,6 +435,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '197' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -456,13 +450,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -478,9 +470,9 @@ interactions: message: OK - request: body: '{"name": "Test Repository 2", "label": "just_a_test_repo2", "product_id": - 21, "content_type": "yum", "url": "https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/", - "gpg_key_id": 3, "ssl_ca_cert_id": 4, "ssl_client_cert_id": 4, "ssl_client_key_id": - 4, "mirroring_policy": "additive"}' + 1, "content_type": "yum", "url": "https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/", + "gpg_key_id": 4, "ssl_ca_cert_id": 5, "ssl_client_cert_id": 5, "ssl_client_key_id": + 5, "mirroring_policy": "additive"}' headers: Accept: - application/json;version=2 @@ -489,7 +481,7 @@ interactions: Connection: - keep-alive Content-Length: - - '286' + - '285' Content-Type: - application/json User-Agent: @@ -498,15 +490,15 @@ interactions: uri: https://foreman.example.org/katello/api/repositories response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":21,"library_instance_id":null,"last_contents_changed":"2022-09-14 - 11:28:02 UTC","organization_id":6,"organization":{"name":"Test Organization","label":"Test_Organization","id":6},"created_at":"2022-09-14 - 11:28:01 UTC","updated_at":"2022-09-14 11:28:02 UTC","backend_identifier":"3e823f85-a892-4b1d-ba9f-595e56c9b167","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-5.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/52d07ef3-f77c-4fb7-89cf-dbca9bf2d2eb/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/126c63ab-bac7-4d57-9bd3-2f53e7339727/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":25,"name":"Test - Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":10,"name":"Default - Organization View"},"content_view_version":{"id":21,"name":"Default Organization - View 1.0","content_view_id":10},"kt_environment":{"id":5,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1663154882204","generic_remote_options":null,"major":null,"minor":null,"product":{"id":21,"cp_id":"160566138145","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":5,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":3,"ssl_ca_cert_id":4,"ssl_client_cert_id":4,"ssl_client_key_id":4,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":4,"name":"Test - SSL Cert"},"ssl_client_cert":{"id":4,"name":"Test SSL Cert"},"ssl_client_key":{"id":4,"name":"Test - SSL Cert"},"gpg_key":{"id":3,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + string: ' {"relative_path":"Test_Organization/Library/custom/Test_Product/just_a_test_repo2","promoted":false,"content_view_version_id":2,"library_instance_id":null,"last_contents_changed":"2023-07-26 + 13:04:48 UTC","organization_id":3,"organization":{"name":"Test Organization","label":"Test_Organization","id":3},"created_at":"2023-07-26 + 13:04:47 UTC","updated_at":"2023-07-26 13:04:49 UTC","backend_identifier":"8d0a3018-7146-4e37-805a-a92b08fe3c1f","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Test_Product/just_a_test_repo2/","version_href":"/pulp/api/v3/repositories/rpm/rpm/eca30b5c-cc28-4297-ba07-13aee12b9432/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/196ab34a-3a0e-41e2-aba3-ff880ecb00a0/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"additive","id":8,"name":"Test + Repository 2","label":"just_a_test_repo2","description":null,"content_view_versions":[],"last_sync":null,"content_view":{"id":2,"name":"Default + Organization View"},"content_view_version":{"id":2,"name":"Default Organization + View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"yum","url":"https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/","arch":"noarch","os_versions":[],"content_id":"1690376688252","generic_remote_options":null,"major":null,"minor":null,"product":{"id":1,"cp_id":"830157316014","name":"Test + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo2","last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":4,"ssl_ca_cert_id":5,"ssl_client_cert_id":5,"ssl_client_key_id":5,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":5,"name":"Test + SSL Cert"},"ssl_client_cert":{"id":5,"name":"Test SSL Cert"},"ssl_client_key":{"id":5,"name":"Test + SSL Cert"},"gpg_key":{"id":4,"name":"Test GPG key"},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -514,6 +506,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2795' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -527,13 +521,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.3.0 + - 3.7.0 Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/repository.yml b/tests/test_playbooks/repository.yml index 7ecd07e7e..c8c503b57 100644 --- a/tests/test_playbooks/repository.yml +++ b/tests/test_playbooks/repository.yml @@ -11,11 +11,15 @@ organization_state: present - include_tasks: tasks/content_credential.yml vars: + content_credential_name: "Test GPG key" + content_credential_type: "gpg_key" + content_credential_content: "key" content_credential_state: present - include_tasks: tasks/content_credential.yml vars: content_credential_name: "Test SSL Cert" content_credential_type: "cert" + content_credential_content: "key" content_credential_state: present - include_tasks: tasks/product.yml vars: @@ -117,6 +121,24 @@ repository_mirroring_policy: mirror_content_only expected_change: false repository_name: "Test Repository 2" + - include_tasks: tasks/repository.yml + vars: + repository_state: present + repository_gpg_key: "" + repository_ssl_ca_cert: "" + repository_ssl_client_cert: "" + repository_ssl_client_key: "" + expected_change: true + repository_name: "Test Repository 2" + - include_tasks: tasks/repository.yml + vars: + repository_state: present + repository_gpg_key: "" + repository_ssl_ca_cert: "" + repository_ssl_client_cert: "" + repository_ssl_client_key: "" + expected_change: false + repository_name: "Test Repository 2" - include_tasks: tasks/repository.yml vars: repository_state: absent