diff --git a/testsuite/README.md b/testsuite/README.md index 8bbb2de4bf90..3867659578ea 100644 --- a/testsuite/README.md +++ b/testsuite/README.md @@ -75,10 +75,10 @@ The Open Build System (OBS) projects are: - [https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Test-Packages:Pool](https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Test-Packages:Pool): packages which must be installed on the client systems already; - [https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Test-Packages:Updates](https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Test-Packages:Updates): -packages for `Test-Channel-x86_64` and `Test-Channel-Deb-AMD64` channels. +packages for `Test-Base-Channel-x86_64` and `Fake-Base-Channel-Debian-like` channels. ## Type of provided packages - Normal dummy packages: `andromeda-dummy`, `hoag-dummy`, `orion-dummy`, `milkyway-dummy`, etc. - Wrong encoding of RPM attributes: `blackhole-dummy`. This package should be successfully imported and you will see it -available as part of the `Test-Channel-x86_64` if reposync handled the encoding correctly. +available as part of the `Test-Base-Channel-x86_64` if reposync handled the encoding correctly. diff --git a/testsuite/documentation/cucumber-steps.md b/testsuite/documentation/cucumber-steps.md index de4c37ff0eef..aa20a72fbf04 100644 --- a/testsuite/documentation/cucumber-steps.md +++ b/testsuite/documentation/cucumber-steps.md @@ -514,7 +514,7 @@ Note that the text area variant handles the new lines characters while the other * Download a package from a channel ```gherkin - When I try to download "virgo-dummy-2.0-1.1.noarch.rpm" from channel "test-channel-x86_64" + When I try to download "virgo-dummy-2.0-1.1.noarch.rpm" from channel "test-base-channel-x86_64" Then the download should get a 403 response Then the download should get no error ``` diff --git a/testsuite/features/build_validation/add_MU_repositories/add_maintenance_update_repositories.template b/testsuite/features/build_validation/add_MU_repositories/add_maintenance_update_repositories.template index b23754311f4b..985874d5c941 100644 --- a/testsuite/features/build_validation/add_MU_repositories/add_maintenance_update_repositories.template +++ b/testsuite/features/build_validation/add_MU_repositories/add_maintenance_update_repositories.template @@ -39,3 +39,7 @@ Feature: Add a Maintenance Update custom channel and the custom repositories for And I follow "Sync" And I click on "Sync Now" Then I should see a "Repository sync scheduled" text or "No repositories are currently associated with this channel" text + + Scenario: Wait for running reposyncs to finish after adding custom channel for + When I wait until the channel "custom_channel_" has been synced + Then the "custom_channel_" reposync logs should not report errors diff --git a/testsuite/features/build_validation/add_non_MU_repositories/centos7_minion_add_iso.feature b/testsuite/features/build_validation/add_non_MU_repositories/centos7_minion_add_iso.feature index 7f1e8a131330..0cd6764f8a9e 100644 --- a/testsuite/features/build_validation/add_non_MU_repositories/centos7_minion_add_iso.feature +++ b/testsuite/features/build_validation/add_non_MU_repositories/centos7_minion_add_iso.feature @@ -44,3 +44,6 @@ Feature: Add the CentOS 7 distribution custom repositories And I follow "Sync" And I click on "Sync Now" Then I should see a "Repository sync scheduled" text + + Scenario: The custom channel for Centos 7 DVD has been synced + When I wait until the channel "centos-7-iso" has been synced diff --git a/testsuite/features/build_validation/add_non_MU_repositories/srv_wait_for_custom_reposync.feature b/testsuite/features/build_validation/add_non_MU_repositories/srv_wait_for_custom_reposync.feature deleted file mode 100644 index 1b5b19a01b2a..000000000000 --- a/testsuite/features/build_validation/add_non_MU_repositories/srv_wait_for_custom_reposync.feature +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2021 SUSE LLC -# Licensed under the terms of the MIT license. - -Feature: Wait for reposync activity to finish after adding custom channels - - Scenario: Wait for running reposyncs to finish after adding custom channels - When I wait until all spacewalk-repo-sync finished - - Scenario: Verify the reposync went fine after adding custom channels - Then the reposync logs should not report errors diff --git a/testsuite/features/build_validation/migration/sle15sp3_minion.feature b/testsuite/features/build_validation/migration/sle15sp3_minion.feature index e429d0cbf9b5..397ab412be24 100644 --- a/testsuite/features/build_validation/migration/sle15sp3_minion.feature +++ b/testsuite/features/build_validation/migration/sle15sp3_minion.feature @@ -41,7 +41,7 @@ Feature: Migrate a SLES 15 SP3 Salt minion to 15 SP4 When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Test-Channel-x86_64" + And I check radio button "Test-Base-Channel-x86_64" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/build_validation/migration/sle15sp3_ssh_minion.feature b/testsuite/features/build_validation/migration/sle15sp3_ssh_minion.feature index 6c785c429509..8ada108658fd 100644 --- a/testsuite/features/build_validation/migration/sle15sp3_ssh_minion.feature +++ b/testsuite/features/build_validation/migration/sle15sp3_ssh_minion.feature @@ -42,7 +42,7 @@ Feature: Migrate a SLES 15 SP3 Salt SSH minion to 15 SP4 When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Test-Channel-x86_64" + And I check radio button "Test-Base-Channel-x86_64" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/reposync/srv_wait_for_reposync.feature b/testsuite/features/build_validation/reposync/srv_disable_scheduled_reposync.feature similarity index 54% rename from testsuite/features/reposync/srv_wait_for_reposync.feature rename to testsuite/features/build_validation/reposync/srv_disable_scheduled_reposync.feature index 7ee2d7382815..a7f453dcc8d2 100644 --- a/testsuite/features/reposync/srv_wait_for_reposync.feature +++ b/testsuite/features/build_validation/reposync/srv_disable_scheduled_reposync.feature @@ -1,7 +1,7 @@ # Copyright (c) 2019-2023 SUSE LLC # Licensed under the terms of the MIT license. -Feature: Wait for reposync activity to finish in CI context +Feature: Delete the scheduled task for mgr-sync-refresh Scenario: Log in as admin user Given I am authorized for the "Admin" section @@ -12,9 +12,3 @@ Feature: Wait for reposync activity to finish in CI context And I choose "disabled" And I click on "Update Schedule" And I click on "Delete Schedule" - - Scenario: Kill running reposyncs or wait for them to finish - When I kill all running spacewalk-repo-sync, excepted the ones needed to bootstrap - - Scenario: Wait until all synchronized channels have finished - When I wait until all synchronized channels have finished diff --git a/testsuite/features/build_validation/reposync/srv_sync_all_products.feature b/testsuite/features/build_validation/reposync/srv_sync_all_products.feature index b3c86cf8f8a8..626d610a3422 100644 --- a/testsuite/features/build_validation/reposync/srv_sync_all_products.feature +++ b/testsuite/features/build_validation/reposync/srv_sync_all_products.feature @@ -21,6 +21,7 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "SUSE Linux Enterprise Server LTSS 12 SP4 x86_64" selected When I click the Add Product button And I wait until I see "SUSE Linux Enterprise Server 12 SP4 x86_64" product has been added + And I wait until all synchronized channels for "sles12-sp4" have finished @uyuni @sle12sp4_minion @@ -36,6 +37,7 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "SUSE Linux Enterprise Server 12 SP5 x86_64" selected When I click the Add Product button And I wait until I see "SUSE Linux Enterprise Server 12 SP5 x86_64" product has been added + And I wait until all synchronized channels for "sles12-sp5" have finished @uyuni @sle12sp5_minion @@ -54,6 +56,7 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "SUSE Linux Enterprise Server LTSS 15 SP1 x86_64" selected When I click the Add Product button And I wait until I see "SUSE Linux Enterprise Server 15 SP1 x86_64" product has been added + And I wait until all synchronized channels for "sles15-sp1" have finished @uyuni @sle15sp1_minion @@ -78,6 +81,7 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "Development Tools Module 15 SP2 x86_64" selected When I click the Add Product button And I wait until I see "SUSE Linux Enterprise Server 15 SP2 x86_64" product has been added + And I wait until all synchronized channels for "sles15-sp2" have finished @cloud @sle15sp2_minion @@ -109,6 +113,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Server 15 SP3 x86_64" product has been added + And I wait until all synchronized channels for "sles15-sp3" have finished @cloud @sle15sp3_minion @@ -138,6 +143,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Server 15 SP4 x86_64" product has been added + And I wait until all synchronized channels for "sles15-sp4" have finished @cloud @sle15sp4_minion @@ -167,6 +173,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Server 15 SP5 x86_64" product has been added + And I wait until all synchronized channels for "sles15-sp5" have finished @cloud @sle15sp5_minion @@ -193,6 +200,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Micro 5.1 x86_64" product has been added + And I wait until all synchronized channels for "suse-microos-5.1" have finished @uyuni @slemicro51_minion @@ -225,6 +233,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Micro 5.2 x86_64" product has been added + And I wait until all synchronized channels for "suse-microos-5.2" have finished @uyuni @slemicro52_minion @@ -257,6 +266,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Micro 5.3 x86_64" product has been added + And I wait until all synchronized channels for "sle-micro-5.3" have finished @uyuni @slemicro53_minion @@ -289,6 +299,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Micro 5.4 x86_64" product has been added + And I wait until all synchronized channels for "sle-micro-5.4" have finished @uyuni @slemicro54_minion @@ -301,11 +312,13 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Linux Enterprise Micro 5.4 x86_64" product has been added + And I wait until all synchronized channels for "sle-micro-5.4" have finished @uyuni @slemicro54_minion Scenario: Add SUSE Linux Enterprise Micro 5.4 Uyuni Client tools When I use spacewalk-common-channel to add channel "sle-micro-5.4-devel-uyuni-client" with arch "x86_64" + And I wait until all synchronized channels for "sle-micro-5.4" have finished @susemanager @opensuse154arm_minion @@ -318,11 +331,13 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "openSUSE Leap 15.4 aarch64" product has been added + And I wait until all synchronized channels for "leap15.4-aarch64" have finished @uyuni @opensuse154arm_minion Scenario: Add openSUSE 15.4 for ARM Uyuni Client tools When I use spacewalk-common-channel to add channel "opensuse_leap15_4 opensuse_leap15_4-backports-updates opensuse_leap15_4-non-oss opensuse_leap15_4-non-oss-updates opensuse_leap15_4-sle-updates opensuse_leap15_4-updates opensuse_leap15_4-uyuni-client-devel" with arch "aarch64" + And I wait until all synchronized channels for "leap15.4-aarch64" have finished @susemanager @opensuse155arm_minion @@ -335,11 +350,13 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "openSUSE Leap 15.5 aarch64" product has been added + And I wait until all synchronized channels for "leap15.5-aarch64" have finished @uyuni @opensuse155arm_minion Scenario: Add openSUSE 15.5 for ARM Uyuni Client tools When I use spacewalk-common-channel to add channel "opensuse_leap15_5 opensuse_leap15_5-backports-updates opensuse_leap15_5-non-oss opensuse_leap15_5-non-oss-updates opensuse_leap15_5-sle-updates opensuse_leap15_5-updates opensuse_leap15_5-uyuni-client-devel" with arch "aarch64" + And I wait until all synchronized channels for "leap15.5-aarch64" have finished @susemanager @alma9_minion @@ -351,11 +368,13 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "AlmaLinux 9 x86_64" selected When I click the Add Product button And I wait until I see "AlmaLinux 9 x86_64" product has been added + And I wait until all synchronized channels for "almalinux9" have finished @uyuni @alma9_minion Scenario: Add Alma Linux 9 When I use spacewalk-common-channel to add channel "almalinux9 almalinux9-appstream almalinux9-extras almalinux9-uyuni-client-devel" with arch "x86_64" + And I wait until all synchronized channels for "almalinux9" have finished @susemanager @centos7_minion @@ -367,15 +386,17 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "SUSE Linux Enterprise Server with Expanded Support 7" selected When I click the Add Product button And I wait until I see "SUSE Linux Enterprise Server with Expanded Support 7" product has been added + And I wait until all synchronized channels for "res7" have finished @uyuni @centos7_minion Scenario: Add CentOS 7 When I use spacewalk-common-channel to add channel "centos7 centos7-extras centos7-uyuni-client-devel" with arch "x86_64" + And I wait until all synchronized channels for "res7" have finished @susemanager @liberty9_minion - Scenario: Add Liberty Linux 9 + Scenario: Add Liberty Linux 9 Base product When I follow the left menu "Admin > Setup Wizard > Products" And I wait until I do not see "Loading" text And I enter "RHEL and Liberty 9 Base" as the filtered product description @@ -383,11 +404,22 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "RHEL and Liberty 9 Base" selected When I click the Add Product button And I wait until I see "RHEL and Liberty 9 Base" product has been added + And I wait until all synchronized channels for "el9" have finished + +@susemanager +@liberty9_minion + Scenario: Add Liberty Linux 9 + When I follow the left menu "Admin > Setup Wizard > Products" + And I wait until I do not see "Loading" text + And I enter "RHEL and Liberty 9 Base" as the filtered product description + And I select "RHEL and Liberty 9 Base" as a product + Then I should see the "RHEL and Liberty 9 Base" selected When I open the sub-list of the product "RHEL and Liberty 9 Base" And I select "SUSE Liberty Linux 9" as a product Then I should see the "SUSE Liberty Linux 9" selected When I click the Add Product button And I wait until I see "SUSE Liberty Linux 9" product has been added + And I wait until all synchronized channels for "sll-9" have finished @susemanager @oracle9_minion @@ -399,11 +431,13 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "Oracle Linux 9 x86_64" selected When I click the Add Product button And I wait until I see "Oracle Linux 9 x86_64" product has been added + And I wait until all synchronized channels for "oraclelinux9" have finished @uyuni @oracle9_minion Scenario: Add Oracle Linux 9 When I use spacewalk-common-channel to add channel "oraclelinux9 oraclelinux9-appstream oraclelinux9-uyuni-client-devel" with arch "x86_64" + And I wait until all synchronized channels for "oraclelinux9" have finished @rhel9_minion Scenario: Add RHEL 9 @@ -428,11 +462,13 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "SUSE Linux Enterprise Server with Expanded Support 8" selected When I click the Add Product button And I wait until I see "RHEL or SLES ES or CentOS 8 Base" product has been added + And I wait until all synchronized channels for "res8" have finished @uyuni @rocky8_minion Scenario: Add Rocky Linux 8 When I use spacewalk-common-channel to add channel "rockylinux8 rockylinux8-appstream rockylinux8-extras rockylinux8-uyuni-client-devel" with arch "x86_64" + And I wait until all synchronized channels for "res8" have finished @susemanager @rocky9_minion @@ -444,6 +480,7 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "Rocky Linux 9 x86_64" selected When I click the Add Product button And I wait until I see "Rocky Linux 9 x86_64" product has been added + And I wait until all synchronized channels for "rockylinux-9" have finished @ubuntu2004_minion Scenario: Add Ubuntu 20.04 @@ -454,11 +491,13 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "Ubuntu 20.04" selected When I click the Add Product button And I wait until I see "Ubuntu 20.04" product has been added + And I wait until all synchronized channels for "ubuntu-2004" have finished @uyuni @ubuntu2004_minion Scenario: Add Ubuntu 20.04 When I use spacewalk-common-channel to add channel "ubuntu-2004-pool-amd64-uyuni ubuntu-2004-amd64-main-uyuni ubuntu-2004-amd64-main-updates-uyuni ubuntu-2004-amd64-main-security-uyuni ubuntu-2004-amd64-universe-uyuni ubuntu-2004-amd64-universe-updates-uyuni ubuntu-2004-amd64-universe-security-uyuni ubuntu-2004-amd64-universe-backports-uyuni ubuntu-2004-amd64-uyuni-client-devel" with arch "amd64-deb" + And I wait until all synchronized channels for "ubuntu-2004" have finished @susemanager @ubuntu2204_minion @@ -470,11 +509,13 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "Ubuntu 22.04" selected When I click the Add Product button And I wait until I see "Ubuntu 22.04" product has been added + And I wait until all synchronized channels for "ubuntu-2204" have finished @uyuni @ubuntu2204_minion Scenario: Add Ubuntu 22.04 When I use spacewalk-common-channel to add channel "ubuntu-2204-pool-amd64-uyuni ubuntu-2204-amd64-main-uyuni ubuntu-2204-amd64-main-updates-uyuni ubuntu-2204-amd64-main-security-uyuni ubuntu-2204-amd64-universe-uyuni ubuntu-2204-amd64-universe-updates-uyuni ubuntu-2204-amd64-universe-security-uyuni ubuntu-2204-amd64-universe-backports-uyuni ubuntu-2204-amd64-uyuni-client-devel" with arch "amd64-deb" + And I wait until all synchronized channels for "ubuntu-2204" have finished @susemanager @debian10_minion @@ -486,11 +527,13 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "Debian 10" selected When I click the Add Product button And I wait until I see "Debian 10" product has been added + And I wait until all synchronized channels for "debian-10" have finished @uyuni @debian10_minion Scenario: Add Debian 10 When I use spacewalk-common-channel to add channel "debian-10-pool-amd64-uyuni debian-10-amd64-main-updates-uyuni debian-10-amd64-main-security-uyuni debian-10-amd64-uyuni-client-devel" with arch "amd64-deb" + And I wait until all synchronized channels for "debian-10" have finished @susemanager @debian11_minion @@ -502,6 +545,7 @@ Feature: Synchronize products in the products page of the Setup Wizard Then I should see the "Debian 11" selected When I click the Add Product button And I wait until I see "Debian 11" product has been added + And I wait until all synchronized channels for "debian-11" have finished @uyuni @debian11_minion @@ -535,6 +579,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Manager Proxy 4.3 x86_64" product has been added + And I wait until all synchronized channels for "suma-proxy-43" have finished @cloud @proxy @@ -546,6 +591,7 @@ Feature: Synchronize products in the products page of the Setup Wizard @proxy Scenario: Add Uyuni Leap 15.4 Proxy, inlcuding Uyuni Client Tools When I use spacewalk-common-channel to add channel "opensuse_leap15_4 opensuse_leap15_4-non-oss opensuse_leap15_4-non-oss-updates opensuse_leap15_4-updates opensuse_leap15_4-backports-updates opensuse_leap15_4-sle-updates uyuni-proxy-stable-leap-154 opensuse_leap15_4-uyuni-client-devel" with arch "x86_64" + And I wait until all synchronized channels for "uyuni-proxy" have finished @susemanager @proxy @@ -558,6 +604,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Manager Retail Branch Server 4.3 x86_64" product has been added + And I wait until all synchronized channels for "suma-retail-branch-server-43" have finished Scenario: Detect product loading issues from the UI in Build Validation When I follow the left menu "Admin > Setup Wizard > Products" diff --git a/testsuite/features/build_validation/reposync/srv_wait_for_product_reposync.feature b/testsuite/features/build_validation/reposync/srv_wait_for_product_reposync.feature deleted file mode 100644 index 9f499774a12a..000000000000 --- a/testsuite/features/build_validation/reposync/srv_wait_for_product_reposync.feature +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2021 SUSE LLC -# Licensed under the terms of the MIT license. - -Feature: Wait for reposync activity to finish after adding products - - Scenario: Log in as admin user - Given I am authorized for the "Admin" section - - Scenario: Delete scheduled reposyncs - When I follow the left menu "Admin > Task Schedules" - And I follow "mgr-sync-refresh-default" - And I choose "disabled" - And I click on "Update Schedule" - And I click on "Delete Schedule" - - Scenario: Wait for running reposyncs to finish after adding products - When I wait until all spacewalk-repo-sync finished - - Scenario: Verify the reposync went fine after adding products - Then the reposync logs should not report errors diff --git a/testsuite/features/core/srv_channels_add.feature b/testsuite/features/core/srv_channels_add.feature deleted file mode 100644 index 2baa076144c8..000000000000 --- a/testsuite/features/core/srv_channels_add.feature +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (c) 2015-2023 SUSE LLC -# Licensed under the terms of the MIT license. -# -# This feature can cause failures in: -# - features/core/srv_create_activationkey.feature -# - features/reposync/srv_create_repository.feature -# - features/init_client/sle_minion.feature -# - features/init_client/sle_ssh_minion.feature -# - features/init_client/min_rhlike.feature -# - features/secondary/allcli_software_channels.feature -# - features/secondary/min_deblike_ssh.feature -# - features/secondary/min_rhlike_openscap_audit.feature -# - features/secondary/min_rhlike_salt_install_package_and_patch.feature -# - features/secondary/min_rhlike_ssh.feature -# - features/secondary/srv_content_lifecycle.feature -# - features/secondary/srv_delete_channel_from_ui.feature -# - features/secondary/srv_dist_channel_mapping.feature -# - features/secondary/srv_manage_activationkey.feature -# - features/secondary/srv_manage_channels_page.feature -# - features/secondary/srv_patches_page.feature -# - features/secondary/srv_push_package.feature - -Feature: Adding channels - In Order to distribute software to the clients - As an authorized user - I want to add channels - - Scenario: Log in as admin user - Given I am authorized for the "Admin" section - - Scenario: Add a base channel - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake Base Channel" as "Channel Name" - And I enter "fake_base_channel" as "Channel Label" - And I select "None" from "Parent Channel" - And I select "x86_64" from "Architecture:" - And I enter "Base channel for testing" as "Channel Summary" - And I enter "No more description for base channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Fake Base Channel created." text - - Scenario: Add a child channel - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake Child Channel" as "Channel Name" - And I enter "fake_child_channel" as "Channel Label" - And I select "Fake Base Channel" from "Parent Channel" - And I select "x86_64" from "Architecture:" - And I enter "Child channel for testing" as "Channel Summary" - And I enter "Description for Fake Child Channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Fake Child Channel created." text - - Scenario: Add a base test channel for i586 - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake-i586-Channel" as "Channel Name" - And I enter "fake-i586-channel" as "Channel Label" - And I select "None" from "Parent Channel" - And I select "IA-32" from "Architecture:" - And I enter "Fake-i586-Channel channel for testing" as "Channel Summary" - And I enter "No more description for base channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Fake-i586-Channel created." text - - Scenario: Add a child channel to the i586 test channel - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake-i586-Channel Child Channel" as "Channel Name" - And I enter "fake-i586-channel-child-channel" as "Channel Label" - And I select "Fake-i586-Channel" from "Parent Channel" - And I select "IA-32" from "Architecture:" - And I enter "Fake-i586-Channel child channel for testing" as "Channel Summary" - And I enter "Description for Fake-i586-Channel Child Channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Fake-i586-Channel Child Channel created." text - - Scenario: Add a test base channel for x86_64 - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Test-Channel-x86_64" as "Channel Name" - And I enter "test-channel-x86_64" as "Channel Label" - And I select "None" from "Parent Channel" - And I select "x86_64" from "Architecture:" - And I enter "Test-Channel-x86_64 channel for testing" as "Channel Summary" - And I enter "No more description for base channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Test-Channel-x86_64 created." text - - Scenario: Add a child channel to the x86_64 test channel - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Test-Channel-x86_64 Child Channel" as "Channel Name" - And I enter "test-channel-x86_64-child-channel" as "Channel Label" - And I select "Test-Channel-x86_64" from "Parent Channel" - And I select "x86_64" from "Architecture:" - And I enter "Test-Channel-x86_64 child channel for testing" as "Channel Summary" - And I enter "Description for Test-Channel-x86_64 Child Channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Test-Channel-x86_64 Child Channel created." text - - Scenario: Add Debian-like AMD64 base channel - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake-Deb-AMD64-Channel" as "Channel Name" - And I enter "fake-deb-amd64-channel" as "Channel Label" - And I select "None" from "Parent Channel" - And I select "AMD64 Debian" from "Architecture:" - And I enter "Fake-Deb-AMD64-Channel for testing" as "Channel Summary" - And I enter "No more description for base channel." as "Channel Description" - # WORKAROUND - # GPG verification of Debian-like repos is possible with an own GPG key. - # This is not yet part of the testsuite and we run with disabled checkes for Ubuntu/Debian - And I uncheck "gpg_check" - # End of WORKAROUND - And I click on "Create Channel" - Then I should see a "Channel Fake-Deb-AMD64-Channel created." text - - Scenario: Add a RedHat-like base channel - When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake-RH-Like-Channel" as "Channel Name" - And I enter "fake-rh-like-channel" as "Channel Label" - And I select "None" from "Parent Channel" - And I select "x86_64" from "Architecture:" - And I enter "Fake-RH-Like-Channel for testing" as "Channel Summary" - And I enter "No more description for base channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Fake-RH-Like-Channel created." text - - Scenario: Wait for Channels generated initial metadata - When I wait until the channel "test-channel-x86_64" has been synced - And I wait until the channel "fake-i586-channel" has been synced diff --git a/testsuite/features/github_validation/core/create_repository.feature b/testsuite/features/github_validation/core/create_repository.feature index 76bd5b8761a2..e1650525cdbf 100644 --- a/testsuite/features/github_validation/core/create_repository.feature +++ b/testsuite/features/github_validation/core/create_repository.feature @@ -30,24 +30,24 @@ Feature: Add a repository to a channel Scenario: Add the repository to the x86_64 channel When I follow the left menu "Software > Manage > Channels" - And I follow "Test-Channel-x86_64" + And I follow "Test-Base-Channel-x86_64" And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" And I click on "Update Channel" - Then I should see a "Channel Test-Channel-x86_64 updated" text + Then I should see a "Channel Test-Base-Channel-x86_64 updated" text When I follow "Repositories" in the content area And I select the "fake-rpm-repo" repo And I click on "Save Repositories" - Then I should see a "Test-Channel-x86_64 repository information was successfully updated" text + Then I should see a "Test-Base-Channel-x86_64 repository information was successfully updated" text Scenario: Synchronize the repository in the x86_64 channel When I follow the left menu "Software > Manage > Channels" - And I follow "Test-Channel-x86_64" + And I follow "Test-Base-Channel-x86_64" And I follow "Repositories" in the content area And I follow "Sync" And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page And I click on "Sync Now" - Then I should see a "Repository sync scheduled for Test-Channel-x86_64." text - And I wait until the channel "test-channel-x86_64" has been synced + Then I should see a "Repository sync scheduled for Test-Base-Channel-x86_64." text + And I wait until the channel "test-base-channel-x86_64" has been synced Scenario: Add a test repository for i586 When I follow the left menu "Software > Manage > Repositories" @@ -60,23 +60,23 @@ Feature: Add a repository to a channel Scenario: Add the repository to the i586 channel When I follow the left menu "Software > Manage > Channels" - And I follow "Fake-i586-Channel" + And I follow "Fake-Base-Channel-i586" And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" And I click on "Update Channel" - Then I should see a "Channel Fake-i586-Channel updated" text + Then I should see a "Channel Fake-Base-Channel-i586 updated" text When I follow "Repositories" in the content area And I select the "fake-i586-repo" repo And I click on "Save Repositories" - Then I should see a "Fake-i586-Channel repository information was successfully updated" text + Then I should see a "Fake-Base-Channel-i586 repository information was successfully updated" text Scenario: Synchronize the repository in the i586 channel When I follow the left menu "Software > Manage > Channels" - And I follow "Fake-i586-Channel" + And I follow "Fake-Base-Channel-i586" And I follow "Repositories" in the content area And I follow "Sync" And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page And I click on "Sync Now" - Then I should see a "Repository sync scheduled for Fake-i586-Channel." text + Then I should see a "Repository sync scheduled for Fake-Base-Channel-i586." text @deblike_minion Scenario: Add a test repository for Debian-like @@ -91,34 +91,33 @@ Feature: Add a repository to a channel @deblike_minion Scenario: Add the Debian-like repository to the AMD64 channel When I follow the left menu "Software > Manage > Channels" - And I follow "Fake-Deb-AMD64-Channel" + And I follow "Fake-Base-Channel-Debian-like" And I follow "Repositories" in the content area And I select the "fake-debian-repo" repo And I click on "Save Repositories" - Then I should see a "Fake-Deb-AMD64-Channel repository information was successfully updated" text + Then I should see a "Fake-Base-Channel-Debian-like repository information was successfully updated" text @deblike_minion Scenario: Synchronize the Debian-like repository in the AMD64 channel When I follow the left menu "Software > Manage > Channels" - And I follow "Fake-Deb-AMD64-Channel" + And I follow "Fake-Base-Channel-Debian-like" And I follow "Repositories" in the content area And I follow "Sync" And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page And I click on "Sync Now" - Then I should see a "Repository sync scheduled for Fake-Deb-AMD64-Channel." text + Then I should see a "Repository sync scheduled for Fake-Base-Channel-Debian-like." text @rhlike_minion Scenario: Add the repository to the RedHat-like channel When I follow the left menu "Software > Manage > Channels" - And I follow "Fake-RH-Like-Channel" + And I follow "Fake-Base-Channel-RH-like" And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" And I click on "Update Channel" - Then I should see a "Channel Fake-RH-Like-Channel updated" text + Then I should see a "Channel Fake-Base-Channel-RH-like updated" text When I follow "Repositories" in the content area And I select the "fake-rpm-repo" repo And I click on "Save Repositories" - Then I should see a "Fake-RH-Like-Channel repository information was successfully updated" text + Then I should see a "Fake-Base-Channel-RH-like repository information was successfully updated" text Scenario: Cleanup disable source package syncing Then I disable source package syncing - diff --git a/testsuite/features/github_validation/init_clients/sle_minion.feature b/testsuite/features/github_validation/init_clients/sle_minion.feature index c33ccb99fa3b..60a86c3ea309 100644 --- a/testsuite/features/github_validation/init_clients/sle_minion.feature +++ b/testsuite/features/github_validation/init_clients/sle_minion.feature @@ -21,7 +21,7 @@ Feature: Bootstrap a Salt minion via the GUI When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake Base Channel" + And I check radio button "Fake-Base-Channel" And I wait until I do not see "Loading..." text And I check "Fake-RPM-SUSE-Channel" And I click on "Next" @@ -29,4 +29,3 @@ Feature: Bootstrap a Salt minion via the GUI When I click on "Confirm" Then I should see a "Changing the channels has been scheduled." text And I wait until event "Subscribe channels scheduled by admin" is completed - diff --git a/testsuite/features/github_validation/init_clients/sle_ssh_minion.feature b/testsuite/features/github_validation/init_clients/sle_ssh_minion.feature index 0958f997dc76..ce9730db0dae 100644 --- a/testsuite/features/github_validation/init_clients/sle_ssh_minion.feature +++ b/testsuite/features/github_validation/init_clients/sle_ssh_minion.feature @@ -23,7 +23,7 @@ Feature: Bootstrap a Salt host managed via salt-ssh When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake Base Channel" + And I check radio button "Fake-Base-Channel" And I wait until I do not see "Loading..." text And I check "Fake-RPM-SUSE-Channel" And I click on "Next" diff --git a/testsuite/features/init_clients/min_deblike_salt.feature b/testsuite/features/init_clients/min_deblike_salt.feature index 8d052b3eb8ef..ccfce6758217 100644 --- a/testsuite/features/init_clients/min_deblike_salt.feature +++ b/testsuite/features/init_clients/min_deblike_salt.feature @@ -45,7 +45,7 @@ Feature: Bootstrap a Debian-like minion and do some basic operations on it When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake-Deb-AMD64-Channel" + And I check radio button "Fake-Base-Channel-Debian-like" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/init_clients/min_rhlike_salt.feature b/testsuite/features/init_clients/min_rhlike_salt.feature index 348ef0222653..c1e6d411b33a 100644 --- a/testsuite/features/init_clients/min_rhlike_salt.feature +++ b/testsuite/features/init_clients/min_rhlike_salt.feature @@ -44,7 +44,7 @@ Feature: Bootstrap a Red Hat-like minion and do some basic operations on it When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake Base Channel" + And I check radio button "Fake-Base-Channel" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/init_clients/min_virthost.feature b/testsuite/features/init_clients/min_virthost.feature index 0e57b759923b..5951312b2beb 100644 --- a/testsuite/features/init_clients/min_virthost.feature +++ b/testsuite/features/init_clients/min_virthost.feature @@ -17,7 +17,7 @@ Feature: Bootstrap a virtualization host minion and set it up for virtualization When I enter "KVM testing" as "description" And I enter "KVM-TEST" as "key" And I enter "20" as "usageLimit" - And I select "Test-Channel-x86_64" from "selectedBaseChannel" + And I select "Test-Base-Channel-x86_64" from "selectedBaseChannel" And I click on "Create Activation Key" Then I should see a "Activation key KVM testing has been created" text diff --git a/testsuite/features/init_clients/srv_check_reposync.feature b/testsuite/features/init_clients/srv_check_reposync.feature deleted file mode 100644 index 1f3c45c22f9c..000000000000 --- a/testsuite/features/init_clients/srv_check_reposync.feature +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2020-2023 SUSE LLC -# Licensed under the terms of the MIT license. - -Feature: Reposync works as expected - - Scenario: Check reposync of custom channel - When I wait until the channel "fake-rpm-suse-channel" has been synced - Then "orion-dummy-1.1-1.1.x86_64.rpm" package should have been stored - And solver file for "fake-rpm-suse-channel" should reference "orion-dummy-1.1-1.1.x86_64.rpm" diff --git a/testsuite/features/init_clients/allcli_update_activationkeys.feature b/testsuite/features/reposync/allcli_update_activationkeys.feature similarity index 92% rename from testsuite/features/init_clients/allcli_update_activationkeys.feature rename to testsuite/features/reposync/allcli_update_activationkeys.feature index fce6514f0997..5d60e5bf0923 100644 --- a/testsuite/features/init_clients/allcli_update_activationkeys.feature +++ b/testsuite/features/reposync/allcli_update_activationkeys.feature @@ -16,7 +16,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "SUSE Test Key x86_64" in the content area And I wait for child channels to appear - And I select "SLE-Product-SLES15-SP4-Pool for x86_64" from "selectedBaseChannel" + And I select the parent channel for the "sle_minion" from "selectedBaseChannel" And I wait for child channels to appear And I include the recommended child channels And I wait until "SLE-Module-Basesystem15-SP4-Pool for x86_64" has been checked @@ -38,7 +38,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "SUSE Test Key x86_64" in the content area And I wait until I do not see "Loading..." text - And I select "openSUSE Leap 15.5 (x86_64)" from "selectedBaseChannel" + And I select the parent channel for the "sle_minion" from "selectedBaseChannel" And I wait until I do not see "Loading..." text And I check "openSUSE 15.5 non oss (x86_64)" And I check "openSUSE Leap 15.5 non oss Updates (x86_64)" @@ -56,7 +56,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "SUSE SSH Test Key x86_64" in the content area And I wait for child channels to appear - And I select "SLE-Product-SLES15-SP4-Pool for x86_64" from "selectedBaseChannel" + And I select the parent channel for the "sle_minion" from "selectedBaseChannel" And I wait for child channels to appear And I include the recommended child channels And I check "SLE-Module-DevTools15-SP4-Pool for x86_64" @@ -69,7 +69,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "SUSE SSH Test Key x86_64" in the content area And I wait until I do not see "Loading..." text - And I select "openSUSE Leap 15.5 (x86_64)" from "selectedBaseChannel" + And I select the parent channel for the "sle_minion" from "selectedBaseChannel" And I wait until I do not see "Loading..." text And I check "openSUSE 15.5 non oss (x86_64)" And I check "openSUSE Leap 15.5 non oss Updates (x86_64)" @@ -87,7 +87,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "SUSE SSH Tunnel Test Key x86_64" in the content area And I wait for child channels to appear - And I select "SLE-Product-SLES15-SP4-Pool for x86_64" from "selectedBaseChannel" + And I select the parent channel for the "sle_minion" from "selectedBaseChannel" And I wait for child channels to appear And I include the recommended child channels And I check "SLE-Module-DevTools15-SP4-Pool for x86_64" @@ -100,7 +100,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "SUSE SSH Tunnel Test Key x86_64" in the content area And I wait until I do not see "Loading..." text - And I select "openSUSE Leap 15.5 (x86_64)" from "selectedBaseChannel" + And I select the parent channel for the "sle_minion" from "selectedBaseChannel" And I wait until I do not see "Loading..." text And I check "openSUSE 15.5 non oss (x86_64)" And I check "openSUSE Leap 15.5 non oss Updates (x86_64)" @@ -118,7 +118,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "Proxy Key x86_64" in the content area And I wait for child channels to appear - And I select "SLE-Product-SUSE-Manager-Proxy-4.3-Pool for x86_64" from "selectedBaseChannel" + And I select the parent channel for the "proxy" from "selectedBaseChannel" And I wait for child channels to appear And I include the recommended child channels And I wait until "SLE-Module-Basesystem15-SP4-Pool for x86_64 Proxy 4.3" has been checked @@ -135,7 +135,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "Proxy Key x86_64" in the content area And I wait for child channels to appear - And I select "openSUSE Leap 15.5 (x86_64)" from "selectedBaseChannel" + And I select the parent channel for the "proxy" from "selectedBaseChannel" And I wait for child channels to appear And I check "openSUSE 15.5 non oss (x86_64)" And I check "openSUSE Leap 15.5 non oss Updates (x86_64)" @@ -152,7 +152,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "Build host Key x86_64" in the content area And I wait for child channels to appear - And I select "SLE-Product-SLES15-SP4-Pool for x86_64" from "selectedBaseChannel" + And I select the parent channel for the "buildhost" from "selectedBaseChannel" And I wait for child channels to appear And I include the recommended child channels And I wait until "SLE-Module-Basesystem15-SP4-Pool for x86_64" has been checked @@ -173,7 +173,7 @@ Feature: Update activation keys When I follow the left menu "Systems > Activation Keys" And I follow "Terminal Key x86_64" in the content area And I wait for child channels to appear - And I select "SLE-Product-SLES15-SP4-Pool for x86_64" from "selectedBaseChannel" + And I select the parent channel for the "pxeboot_minion" from "selectedBaseChannel" And I wait for child channels to appear And I include the recommended child channels And I wait until "SLE-Module-Basesystem15-SP4-Pool for x86_64" has been checked diff --git a/testsuite/features/reposync/reference_srv_check_reposync.feature b/testsuite/features/reposync/reference_srv_check_reposync.feature index f6c1927bc287..a587591ca0f4 100644 --- a/testsuite/features/reposync/reference_srv_check_reposync.feature +++ b/testsuite/features/reposync/reference_srv_check_reposync.feature @@ -6,58 +6,58 @@ Feature: Reposync works as expected @scc_credentials @susemanager Scenario: Check reposync of Rocky Linux 8 channels being finished - Then I wait until the channel "rockylinux-8-x86_64" has been synced with packages - And I wait until the channel "rockylinux-8-appstream-x86_64" has been synced with packages + Then I wait until the channel "rockylinux-8-x86_64" has been synced + And I wait until the channel "rockylinux-8-appstream-x86_64" has been synced @uyuni Scenario: Check reposync of Rocky Linux 8 channels being finished - Then I wait until the channel "rockylinux8-x86_64" has been synced with packages - And I wait until the channel "rockylinux8-x86_64-appstream" has been synced with packages + Then I wait until the channel "rockylinux8-x86_64" has been synced + And I wait until the channel "rockylinux8-x86_64-appstream" has been synced @scc_credentials @susemanager Scenario: Check reposync of Ubuntu 22.04 channels being finished - Then I wait until the channel "ubuntu-2204-amd64-main-amd64" has been synced with packages - And I wait until the channel "ubuntu-2204-amd64-main-updates-amd64" has been synced with packages - And I wait until the channel "ubuntu-2204-amd64-main-security-amd64" has been synced with packages + Then I wait until the channel "ubuntu-2204-amd64-main-amd64" has been synced + And I wait until the channel "ubuntu-2204-amd64-main-updates-amd64" has been synced + And I wait until the channel "ubuntu-2204-amd64-main-security-amd64" has been synced @uyuni Scenario: Check reposync of Ubuntu 22.04 channels being finished Then I wait until the channel "ubuntu-22.04-pool-amd64-uyuni" has been synced - And I wait until the channel "ubuntu-2204-amd64-main-uyuni" has been synced with packages - And I wait until the channel "ubuntu-2204-amd64-main-updates-uyuni" has been synced with packages - And I wait until the channel "ubuntu-2204-amd64-main-security-uyuni" has been synced with packages + And I wait until the channel "ubuntu-2204-amd64-main-uyuni" has been synced + And I wait until the channel "ubuntu-2204-amd64-main-updates-uyuni" has been synced + And I wait until the channel "ubuntu-2204-amd64-main-security-uyuni" has been synced @scc_credentials @susemanager Scenario: Check reposync of SLES 15 SP4 channels being finished - Then I wait until the channel "sle-module-basesystem15-sp4-updates-x86_64" has been synced with packages - And I wait until the channel "sle-module-server-applications15-sp4-updates-x86_64" has been synced with packages - And I wait until the channel "sle-module-desktop-applications15-sp4-updates-x86_64" has been synced with packages - And I wait until the channel "sle-module-devtools15-sp4-updates-x86_64" has been synced with packages - And I wait until the channel "sle-module-containers15-sp4-pool-x86_64" has been synced with packages + Then I wait until the channel "sle-module-basesystem15-sp4-updates-x86_64" has been synced + And I wait until the channel "sle-module-server-applications15-sp4-updates-x86_64" has been synced + And I wait until the channel "sle-module-desktop-applications15-sp4-updates-x86_64" has been synced + And I wait until the channel "sle-module-devtools15-sp4-updates-x86_64" has been synced + And I wait until the channel "sle-module-containers15-sp4-pool-x86_64" has been synced @uyuni Scenario: Check reposync of openSUSE Leap 15.5 channels being finished - Then I wait until the channel "opensuse_leap15_5-x86_64" has been synced with packages - And I wait until the channel "opensuse_leap15_5-non-oss-x86_64" has been synced with packages - And I wait until the channel "opensuse_leap15_5-non-oss-updates-x86_64" has been synced with packages - And I wait until the channel "opensuse_leap15_5-updates-x86_64" has been synced with packages - And I wait until the channel "opensuse_leap15_5-backports-updates-x86_64" has been synced with packages - And I wait until the channel "opensuse_leap15_5-sle-updates-x86_64" has been synced with packages - And I wait until the channel "uyuni-proxy-devel-leap-x86_64" has been synced with packages + Then I wait until the channel "opensuse_leap15_5-x86_64" has been synced + And I wait until the channel "opensuse_leap15_5-non-oss-x86_64" has been synced + And I wait until the channel "opensuse_leap15_5-non-oss-updates-x86_64" has been synced + And I wait until the channel "opensuse_leap15_5-updates-x86_64" has been synced + And I wait until the channel "opensuse_leap15_5-backports-updates-x86_64" has been synced + And I wait until the channel "opensuse_leap15_5-sle-updates-x86_64" has been synced + And I wait until the channel "uyuni-proxy-devel-leap-x86_64" has been synced @scc_credentials @susemanager Scenario: Check reposync of Client Tools being finished Then I wait until the channel "sle-manager-tools15-pool-x86_64-sp4" has been synced - And I wait until the channel "sle-manager-tools15-updates-x86_64-sp4" has been synced with packages - And I wait until the channel "res8-manager-tools-updates-x86_64-rocky" has been synced with packages + And I wait until the channel "sle-manager-tools15-updates-x86_64-sp4" has been synced + And I wait until the channel "res8-manager-tools-updates-x86_64-rocky" has been synced And I wait until the channel "res8-manager-tools-pool-x86_64-rocky" has been synced - And I wait until the channel "ubuntu-22.04-suse-manager-tools-amd64" has been synced with packages + And I wait until the channel "ubuntu-22.04-suse-manager-tools-amd64" has been synced @uyuni Scenario: Check reposync of Client Tools being finished - And I wait until the channel "opensuse_leap15_5-uyuni-client-x86_64" has been synced with packages - And I wait until the channel "rockylinux8-uyuni-client-x86_64" has been synced with packages - And I wait until the channel "ubuntu-2204-amd64-uyuni-client" has been synced with packages + And I wait until the channel "opensuse_leap15_5-uyuni-client-x86_64" has been synced + And I wait until the channel "rockylinux8-uyuni-client-x86_64" has been synced + And I wait until the channel "ubuntu-2204-amd64-uyuni-client" has been synced diff --git a/testsuite/features/core/srv_create_activationkey.feature b/testsuite/features/reposync/srv_create_activationkey.feature similarity index 97% rename from testsuite/features/core/srv_create_activationkey.feature rename to testsuite/features/reposync/srv_create_activationkey.feature index cc4408c9581f..400b70333c4f 100644 --- a/testsuite/features/core/srv_create_activationkey.feature +++ b/testsuite/features/reposync/srv_create_activationkey.feature @@ -60,7 +60,7 @@ Feature: Create activation keys And I wait until I do not see "Loading..." text And I enter "RedHat like Test Key" as "description" And I enter "RH-LIKE-KEY" as "key" - And I select "Fake-RH-Like-Channel" from "selectedBaseChannel" + And I select "Fake-Base-Channel-RH-like" from "selectedBaseChannel" And I click on "Create Activation Key" Then I should see a "Activation key RedHat like Test Key has been created" text @@ -71,7 +71,7 @@ Feature: Create activation keys And I wait until I do not see "Loading..." text And I enter "Debian-like Test Key" as "description" And I enter "DEBLIKE-KEY" as "key" - And I select "Fake-Deb-AMD64-Channel" from "selectedBaseChannel" + And I select "Fake-Base-Channel-Debian-like" from "selectedBaseChannel" And I click on "Create Activation Key" Then I should see a "Activation key Debian-like Test Key has been created" text diff --git a/testsuite/features/reposync/srv_create_fake_channels.feature b/testsuite/features/reposync/srv_create_fake_channels.feature new file mode 100644 index 000000000000..4a9b2e241974 --- /dev/null +++ b/testsuite/features/reposync/srv_create_fake_channels.feature @@ -0,0 +1,158 @@ +# Copyright (c) 2015-2023 SUSE LLC +# Licensed under the terms of the MIT license. +# +# This feature can cause failures in: +# - features/reposync/srv_create_activationkey.feature +# - features/core/srv_create_fake_repositories.feature +# - features/init_client/sle_minion.feature +# - features/init_client/sle_ssh_minion.feature +# - features/init_client/min_rhlike.feature +# - features/secondary/allcli_software_channels.feature +# - features/secondary/min_deblike_ssh.feature +# - features/secondary/min_rhlike_openscap_audit.feature +# - features/secondary/min_rhlike_salt_install_package_and_patch.feature +# - features/secondary/min_rhlike_ssh.feature +# - features/secondary/srv_content_lifecycle.feature +# - features/secondary/srv_delete_channel_from_ui.feature +# - features/secondary/srv_dist_channel_mapping.feature +# - features/secondary/srv_manage_activationkey.feature +# - features/secondary/srv_manage_channels_page.feature +# - features/secondary/srv_patches_page.feature +# - features/secondary/srv_push_package.feature + +Feature: Create fake channels + In Order to distribute software to the clients + As an authorized user + I want to create fake channels for each distribution + + Scenario: Log in as admin user + Given I am authorized for the "Admin" section + + Scenario: Add a fake base channel for x86_64 + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-Base-Channel" as "Channel Name" + And I enter "fake-base-channel" as "Channel Label" + And I select "None" from "Parent Channel" + And I select "x86_64" from "Architecture:" + And I enter "Base channel for testing" as "Channel Summary" + And I enter "No more description for base channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Fake-Base-Channel created." text + + Scenario: Add a fake child channel into the fake base channel x86_64 + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-Child-Channel" as "Channel Name" + And I enter "fake_child_channel" as "Channel Label" + And I select "Fake-Base-Channel" from "Parent Channel" + And I select "x86_64" from "Architecture:" + And I enter "Child channel for testing" as "Channel Summary" + And I enter "Description for Fake Child Channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Fake-Child-Channel created." text + +@sle_minion + Scenario: Add a SUSE fake child channel to the SUSE Product base channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-RPM-SUSE-Channel" as "Channel Name" + And I enter "fake-rpm-suse-channel" as "Channel Label" + And I select the parent channel for the "sle_minion" from "Parent Channel" + And I select "x86_64" from "Architecture:" + And I enter "Fake-RPM-SUSE-Channel for testing" as "Channel Summary" + And I enter "Description for Fake-RPM-SUSE-Channel Child Channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Fake-RPM-SUSE-Channel created." text + + Scenario: Add a fake base channel for i586 + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-Base-Channel-i586" as "Channel Name" + And I enter "fake-base-channel-i586" as "Channel Label" + And I select "None" from "Parent Channel" + And I select "IA-32" from "Architecture:" + And I enter "Fake-Base-Channel-i586 channel for testing" as "Channel Summary" + And I enter "No more description for base channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Fake-Base-Channel-i586 created." text + + Scenario: Add a fake child channel into the fake base channel i586 + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-Child-Channel-i586" as "Channel Name" + And I enter "fake-child-channel-i586" as "Channel Label" + And I select "Fake-Base-Channel-i586" from "Parent Channel" + And I select "IA-32" from "Architecture:" + And I enter "Fake Child Channel i586 for testing" as "Channel Summary" + And I enter "Description for Fake Child Channel i586." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Fake-Child-Channel-i586 created." text + + Scenario: Add a test base channel for x86_64 + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Test-Base-Channel-x86_64" as "Channel Name" + And I enter "test-base-channel-x86_64" as "Channel Label" + And I select "None" from "Parent Channel" + And I select "x86_64" from "Architecture:" + And I enter "Test-Base-Channel-x86_64 channel for testing" as "Channel Summary" + And I enter "No more description for base channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Test-Base-Channel-x86_64 created." text + + Scenario: Add a child channel into the test base channel x86_64 + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Test-Child-Channel-x86_64" as "Channel Name" + And I enter "test-child-channel-x86_64" as "Channel Label" + And I select "Test-Base-Channel-x86_64" from "Parent Channel" + And I select "x86_64" from "Architecture:" + And I enter "Test-Child-Channel-x86_64 channel for testing" as "Channel Summary" + And I enter "Description for Test-Child-Channel-x86_64 Channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Test-Child-Channel-x86_64 created." text + +@pxeboot_minion +@uyuni +@scc_credentials + Scenario: Add a fake terminal child channel to the SUSE Product base channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-RPM-Terminal-Channel" as "Channel Name" + And I enter "fake-rpm-terminal-channel" as "Channel Label" + And I select the parent channel for the "pxeboot_minion" from "Parent Channel" + And I select "x86_64" from "Architecture:" + And I enter "Fake-RPM-Terminal-Channel for testing" as "Channel Summary" + And I enter "Description for Fake-RPM-Terminal-Channel Child Channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Fake-RPM-Terminal-Channel created." text + + Scenario: Add Debian-like AMD64 base channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-Base-Channel-Debian-like" as "Channel Name" + And I enter "fake-base-channel-debian-like" as "Channel Label" + And I select "None" from "Parent Channel" + And I select "AMD64 Debian" from "Architecture:" + And I enter "Fake-Base-Channel-Debian-like for testing" as "Channel Summary" + And I enter "No more description for base channel." as "Channel Description" + # WORKAROUND + # GPG verification of Debian-like repos is possible with an own GPG key. + # This is not yet part of the testsuite and we run with disabled checkes for Ubuntu/Debian + And I uncheck "gpg_check" + # End of WORKAROUND + And I click on "Create Channel" + Then I should see a "Channel Fake-Base-Channel-Debian-like created." text + + Scenario: Add a RedHat-like base channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Create Channel" + And I enter "Fake-Base-Channel-RH-like" as "Channel Name" + And I enter "fake-base-channel-rh-like" as "Channel Label" + And I select "None" from "Parent Channel" + And I select "x86_64" from "Architecture:" + And I enter "Fake-Base-Channel-RH-like for testing" as "Channel Summary" + And I enter "No more description for base channel." as "Channel Description" + And I click on "Create Channel" + Then I should see a "Channel Fake-Base-Channel-RH-like created." text diff --git a/testsuite/features/reposync/srv_create_fake_repositories.feature b/testsuite/features/reposync/srv_create_fake_repositories.feature new file mode 100644 index 000000000000..4f3b784d4d1d --- /dev/null +++ b/testsuite/features/reposync/srv_create_fake_repositories.feature @@ -0,0 +1,128 @@ +# Copyright (c) 2015-2023 SUSE LLC +# Licensed under the terms of the MIT license. +# +# This feature can cause failures in: +# If any fake channel or repository fails to be created: +# - features/reposync/srv_sync_fake_channels.feature + +Feature: Create fake repositories for each fake child channel + In order to distribute software to the clients + As an authorized user + I want to create a fake repository per fake child channel + + Scenario: Log in as admin user + Given I am authorized for the "Admin" section + + Scenario: Create a fake repository for distributions using RPM + When I follow the left menu "Software > Manage > Repositories" + And I follow "Create Repository" + And I enter "fake-rpm-repo" as "label" + And I enter "http://localhost/pub/TestRepoRpmUpdates/" as "url" + And I click on "Create Repository" + Then I should see a "Repository created successfully" text + And I should see "metadataSigned" as checked + + Scenario: Disable metadata check for the fake RPM repository + When I follow the left menu "Software > Manage > Repositories" + And I follow "fake-rpm-repo" + And I uncheck "metadataSigned" + And I click on "Update Repository" + Then I should see a "Repository updated successfully" text + And I should see "metadataSigned" as unchecked + + Scenario: Add the fake RPM repository to the SUSE fake base channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-Base-Channel" + And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" + And I click on "Update Channel" + Then I should see a "Channel Fake-Base-Channel updated" text + When I follow "Repositories" in the content area + And I select the "fake-rpm-repo" repo + And I click on "Save Repositories" + Then I should see a "Fake-Base-Channel repository information was successfully updated" text + + Scenario: Add the fake RPM repository to the SUSE fake child channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-RPM-SUSE-Channel" + And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" + And I click on "Update Channel" + Then I should see a "Channel Fake-RPM-SUSE-Channel updated" text + When I follow "Repositories" in the content area + And I select the "fake-rpm-repo" repo + And I click on "Save Repositories" + Then I should see a "Fake-RPM-SUSE-Channel repository information was successfully updated" text + + Scenario: Add the fake RPM repository to the Test child channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Test-Base-Channel-x86_64" + And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" + And I click on "Update Channel" + Then I should see a "Channel Test-Base-Channel-x86_64 updated" text + When I follow "Repositories" in the content area + And I select the "fake-rpm-repo" repo + And I click on "Save Repositories" + Then I should see a "Test-Base-Channel-x86_64 repository information was successfully updated" text + + @rhlike_minion + Scenario: Add the fake RPM repository to the RedHat-like base channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-Base-Channel-RH-like" + And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" + And I click on "Update Channel" + Then I should see a "Channel Fake-Base-Channel-RH-like updated" text + When I follow "Repositories" in the content area + And I select the "fake-rpm-repo" repo + And I click on "Save Repositories" + Then I should see a "Fake-Base-Channel-RH-like repository information was successfully updated" text + + Scenario: Create a fake repository for i586 + When I follow the left menu "Software > Manage > Repositories" + And I follow "Create Repository" + And I enter "fake-i586-repo" as "label" + And I enter "file:///srv/www/htdocs/pub/TestRepoRpmUpdates/" as "url" + And I uncheck "metadataSigned" + And I click on "Create Repository" + Then I should see a "Repository created successfully" text + + Scenario: Add the repository to the i586 channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-Base-Channel-i586" + And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" + And I click on "Update Channel" + Then I should see a "Channel Fake-Base-Channel-i586 updated" text + When I follow "Repositories" in the content area + And I select the "fake-i586-repo" repo + And I click on "Save Repositories" + Then I should see a "Fake-Base-Channel-i586 repository information was successfully updated" text + +@deblike_minion + Scenario: Create a fake repository for Debian-like + When I follow the left menu "Software > Manage > Repositories" + And I follow "Create Repository" + And I enter "fake-debian-repo" as "label" + And I select "deb" from "contenttype" + And I enter "http://localhost/pub/TestRepoDebUpdates/" as "url" + And I click on "Create Repository" + Then I should see a "Repository created successfully" text + +@deblike_minion + Scenario: Add the repository to the Debian-like base channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-Base-Channel-Debian-like" + And I follow "Repositories" in the content area + And I select the "fake-debian-repo" repo + And I click on "Save Repositories" + Then I should see a "Fake-Base-Channel-Debian-like repository information was successfully updated" text + +@uyuni +@scc_credentials + Scenario: Add the repository to the terminal child channel + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-RPM-Terminal-Channel" + And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" + And I click on "Update Channel" + Then I should see a "Channel Fake-RPM-Terminal-Channel updated" text + When I follow "Repositories" in the content area + And I select the "fake-rpm-repo" repo + And I click on "Save Repositories" + Then I should see a "Fake-RPM-Terminal-Channel repository information was successfully updated" text diff --git a/testsuite/features/reposync/srv_disable_scheduled_reposync.feature b/testsuite/features/reposync/srv_disable_scheduled_reposync.feature new file mode 100644 index 000000000000..767b9acc7e4e --- /dev/null +++ b/testsuite/features/reposync/srv_disable_scheduled_reposync.feature @@ -0,0 +1,13 @@ +# Copyright (c) 2019-2023 SUSE LLC +# Licensed under the terms of the MIT license. + +Feature: Delete the scheduled task for mgr-sync-refresh + + Scenario: Log in as admin user + Given I am authorized for the "Admin" section + + Scenario: Delete scheduled mgr-sync-refresh task + When I follow the left menu "Admin > Task Schedules" + And I follow "mgr-sync-refresh-default" + And I choose "disabled" + And I click on "Update Schedule" diff --git a/testsuite/features/reposync/srv_sync_channels.feature b/testsuite/features/reposync/srv_sync_channels.feature index f2de2353061b..09e595c06c86 100644 --- a/testsuite/features/reposync/srv_sync_channels.feature +++ b/testsuite/features/reposync/srv_sync_channels.feature @@ -44,13 +44,6 @@ Feature: Be able to list available channels and enable them And I shouldn't get "ppc64" And I shouldn't get "s390x" - Scenario: Run spacewalk-repo-sync with custom URLs - When I call spacewalk-repo-sync for channel "fake_base_channel" with a custom url "http://localhost/pub/TestRepoRpmUpdates/" - Then I should see "Channel: fake_base_channel" in the output - And I should see "Sync completed." in the output - And I should see "Total time:" in the output - And I should see "Repo URL:" in the output - Scenario: Let mgr-sync time out When I remove the mgr-sync cache file And I execute mgr-sync refresh diff --git a/testsuite/features/reposync/srv_sync_fake_channels.feature b/testsuite/features/reposync/srv_sync_fake_channels.feature index cb421102567d..7c26f020806a 100644 --- a/testsuite/features/reposync/srv_sync_fake_channels.feature +++ b/testsuite/features/reposync/srv_sync_fake_channels.feature @@ -1,84 +1,99 @@ # Copyright (c) 2022-2023 SUSE LLC # Licensed under the terms of the MIT license. +# +# This feature can cause failures in: +# If Fake-Base-Channel-Debian-like fails to be updated with the repository: +# - features/secondary/min_deblike_salt_install_package.feature +# - features/secondary/min_deblike_salt_install_with_staging.feature +# If Fake-Base-Channel-RH-like fails to be updated with the repository: +# - features/secondary/min_rhlike_salt_install_package_and_patch.feature +# - features/secondary/srv_maintenance_windows.feature -Feature: Prepare fake SUSE channels - In order to have patches and packages to install on clients +Feature: Synchronize fake channels + In order to use the content provided inside the repositories of the fake channels As admin - I want to prepare the channels containing those patches and packages + I want to synchronize the fake channels Scenario: Log in as admin user Given I am authorized for the "Admin" section + And I enable source package syncing - Scenario: Add the fake packages child channel to the base product channel + Scenario: Synchronize Fake-Base-Channel channel + Given I am authorized for the "Admin" section When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake-RPM-SUSE-Channel" as "Channel Name" - And I enter "fake-rpm-suse-channel" as "Channel Label" - And I select the parent channel for the "sle_minion" from "Parent Channel" - And I select "x86_64" from "Architecture:" - And I enter "Fake-RPM-SUSE-Channel for testing" as "Channel Summary" - And I enter "Description for Fake-RPM-SUSE-Channel Child Channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Fake-RPM-SUSE-Channel created." text - - Scenario: Add the repository to the fake packages child channel + And I follow "Fake-Base-Channel" + And I follow "Repositories" in the content area + And I follow "Sync" + And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page + And I click on "Sync Now" + Then I should see a "Repository sync scheduled for Fake-Base-Channel." text + And I wait until the channel "fake-base-channel" has been synced + + Scenario: Synchronize Fake-RPM-SUSE-Channel channel + Given I am authorized for the "Admin" section When I follow the left menu "Software > Manage > Channels" And I follow "Fake-RPM-SUSE-Channel" - And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" - And I click on "Update Channel" - Then I should see a "Channel Fake-RPM-SUSE-Channel updated" text - When I follow "Repositories" in the content area - And I select the "fake-rpm-repo" repo - And I click on "Save Repositories" - Then I should see a "Fake-RPM-SUSE-Channel repository information was successfully updated" text - - Scenario: Synchronize the repository in the fake packages channel - When I enable source package syncing - And I follow the left menu "Software > Manage > Channels" - And I follow "Fake-RPM-SUSE-Channel" And I follow "Repositories" in the content area And I follow "Sync" And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page And I click on "Sync Now" Then I should see a "Repository sync scheduled for Fake-RPM-SUSE-Channel." text And I wait until the channel "fake-rpm-suse-channel" has been synced - And I disable source package syncing - Scenario: Verify state of Fake-RPM-SUSE-Channel custom channel + Scenario: Verify state of Fake-RPM-SUSE-Channel channel Then "orion-dummy-1.1-1.1.x86_64.rpm" package should have been stored And solver file for "fake-rpm-suse-channel" should reference "orion-dummy-1.1-1.1.x86_64.rpm" -@uyuni -@scc_credentials - Scenario: Add the terminal child channel to the base product channel + Scenario: Synchronize Test-Base-Channel-x86_64 channel + Given I am authorized for the "Admin" section When I follow the left menu "Software > Manage > Channels" - And I follow "Create Channel" - And I enter "Fake-RPM-Terminal-Channel" as "Channel Name" - And I enter "fake-rpm-terminal-channel" as "Channel Label" - And I select "SLE-Product-SLES15-SP4-Pool for x86_64" from "Parent Channel" - And I select "x86_64" from "Architecture:" - And I enter "Fake-RPM-Terminal-Channel for testing" as "Channel Summary" - And I enter "Description for Fake-RPM-Terminal-Channel Child Channel." as "Channel Description" - And I click on "Create Channel" - Then I should see a "Channel Fake-RPM-Terminal-Channel created." text + And I follow "Test-Base-Channel-x86_64" + And I follow "Repositories" in the content area + And I follow "Sync" + And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page + And I click on "Sync Now" + Then I should see a "Repository sync scheduled for Test-Base-Channel-x86_64." text + And I wait until the channel "test-base-channel-x86_64" has been synced -@uyuni -@scc_credentials - Scenario: Add the repository to the terminal child channel + Scenario: Synchronize Fake-Base-Channel-i586 channel + Given I am authorized for the "Admin" section When I follow the left menu "Software > Manage > Channels" - And I follow "Fake-RPM-Terminal-Channel" - And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL" - And I click on "Update Channel" - Then I should see a "Channel Fake-RPM-Terminal-Channel updated" text - When I follow "Repositories" in the content area - And I select the "fake-rpm-repo" repo - And I click on "Save Repositories" - Then I should see a "Fake-RPM-Terminal-Channel repository information was successfully updated" text + And I follow "Fake-Base-Channel-i586" + And I follow "Repositories" in the content area + And I follow "Sync" + And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page + And I click on "Sync Now" + Then I should see a "Repository sync scheduled for Fake-Base-Channel-i586." text + And I wait until the channel "fake-base-channel-i586" has been synced + +@deblike_minion + Scenario: Synchronize Fake-Base-Channel-Debian-like channel + Given I am authorized for the "Admin" section + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-Base-Channel-Debian-like" + And I follow "Repositories" in the content area + And I follow "Sync" + And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page + And I click on "Sync Now" + Then I should see a "Repository sync scheduled for Fake-Base-Channel-Debian-like." text + And I wait until the channel "fake-base-channel-debian-like" has been synced + +@rhlike_minion + Scenario: Synchronize Fake-Base-Channel-RH-like channel + Given I am authorized for the "Admin" section + When I follow the left menu "Software > Manage > Channels" + And I follow "Fake-Base-Channel-RH-like" + And I follow "Repositories" in the content area + And I follow "Sync" + And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page + And I click on "Sync Now" + Then I should see a "Repository sync scheduled for Fake-Base-Channel-RH-like." text + And I wait until the channel "fake-base-channel-rh-like" has been synced @uyuni @scc_credentials Scenario: Synchronize the repository in the terminal channel - When I enable source package syncing + Given I am authorized for the "Admin" section And I follow the left menu "Software > Manage > Channels" And I follow "Fake-RPM-Terminal-Channel" And I follow "Repositories" in the content area @@ -87,10 +102,42 @@ Feature: Prepare fake SUSE channels And I click on "Sync Now" Then I should see a "Repository sync scheduled for Fake-RPM-Terminal-Channel." text And I wait until the channel "fake-rpm-terminal-channel" has been synced - And I disable source package syncing + @uyuni @scc_credentials Scenario: Verify state of Fake-RPM-Terminal-Channel custom channel Then "orion-dummy-1.1-1.1.x86_64.rpm" package should have been stored And solver file for "fake-rpm-terminal-channel" should reference "orion-dummy-1.1-1.1.x86_64.rpm" + + Scenario: Refresh the errata cache + When I follow the left menu "Admin > Task Schedules" + And I follow "errata-cache-default" + And I follow "errata-cache-bunch" + And I click on "Single Run Schedule" + Then I should see a "bunch was scheduled" text + And I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows + + Scenario: Refresh the channel's repository data + When I follow the left menu "Admin > Task Schedules" + And I follow "channel-repodata-default" + And I follow "channel-repodata-bunch" + And I click on "Single Run Schedule" + Then I should see a "bunch was scheduled" text + And I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows + + Scenario: Reposync handles wrong encoding on RPM attributes + When I follow the left menu "Software > Channel List" + And I follow "Test-Base-Channel-x86_64" + And I follow "Packages" in the content area + And I wait until I see "blackhole-dummy" text, refreshing the page + +@deblike_minion + Scenario: Reposync handles wrong encoding on DEB attributes + When I follow the left menu "Software > Channel List" + And I follow "Fake-Base-Channel-Debian-like" + And I follow "Packages" in the content area + And I wait until I see "blackhole-dummy" text, refreshing the page + + Scenario: Cleanup disable source package syncing + Then I disable source package syncing diff --git a/testsuite/features/reposync/srv_sync_products.feature b/testsuite/features/reposync/srv_sync_products.feature index b59db89cb7de..3ef6c12dadf6 100644 --- a/testsuite/features/reposync/srv_sync_products.feature +++ b/testsuite/features/reposync/srv_sync_products.feature @@ -35,7 +35,8 @@ Feature: Synchronize products in the products page of the Setup Wizard @scc_credentials @susemanager - Scenario: Add SLES 15 SP4 product with recommended sub-products, including SUMA Client Tools + Scenario: Synchronize SLES 15 SP4 product with recommended sub-products, including SUMA Client Tools + Given I am authorized for the "Admin" section When I follow the left menu "Admin > Setup Wizard > Products" And I wait until I do not see "Loading" text And I enter "SUSE Linux Enterprise Server 15 SP4" as the filtered product description @@ -43,7 +44,7 @@ Feature: Synchronize products in the products page of the Setup Wizard And I open the sub-list of the product "SUSE Linux Enterprise Server 15 SP4 x86_64" And I open the sub-list of the product "Basesystem Module 15 SP4 x86_64" And I open the sub-list of the product "Desktop Applications Module 15 SP4 x86_64" - And I open the sub-list of the product "SUSE Manager Client Tools for SLE 15 x86_64" + And I open the sub-list of the product "SUSE Manager Client Tools for SLE 15 x86_64" if present Then I should see that the "Basesystem Module 15 SP4 x86_64" product is "recommended" And I should see that the "Server Applications Module 15 SP4 x86_64" product is "recommended" And I should see that the "SUSE Manager Client Tools for SLE 15 x86_64" product is "recommended" @@ -61,10 +62,12 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "SUSE Linux Enterprise Server 15 SP4 x86_64" product has been added Then the SLE15 SP4 product should be added + When I wait until all synchronized channels for "sles15-sp4" have finished @scc_credentials @uyuni - Scenario: Add SLES 15 SP4 product with recommended sub-products for the build host and the terminal + Scenario: Synchronize SLES 15 SP4 product with recommended sub-products for Retail feature + Given I am authorized for the "Admin" section When I follow the left menu "Admin > Setup Wizard > Products" And I wait until I do not see "Loading" text And I enter "SUSE Linux Enterprise Server 15 SP4" as the filtered product description @@ -87,14 +90,20 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "SUSE Linux Enterprise Server 15 SP4 x86_64" product has been added Then the SLE15 SP4 product should be added + When I use spacewalk-common-channel to add channel "sles15-sp4-uyuni-client" with arch "x86_64" + And I wait until all synchronized channels for "sles15-sp4" have finished + # TODO: Refactor the scenarios in order to don't require a full synchronization of SLES 15 SP4 product in Uyuni + # When I kill running spacewalk-repo-sync for "sles15-sp4" @uyuni Scenario: Add openSUSE Leap 15.5 product, including Uyuni Client Tools When I use spacewalk-common-channel to add channel "opensuse_leap15_5 opensuse_leap15_5-non-oss opensuse_leap15_5-non-oss-updates opensuse_leap15_5-updates opensuse_leap15_5-backports-updates opensuse_leap15_5-sle-updates uyuni-proxy-devel-leap opensuse_leap15_5-uyuni-client" with arch "x86_64" + And I kill running spacewalk-repo-sync for "leap15.5-x86_64" @proxy @susemanager Scenario: Add SUSE Manager Proxy 4.3 + Given I am authorized for the "Admin" section When I follow the left menu "Admin > Setup Wizard > Products" And I wait until I do not see "Loading" text And I enter "SUSE Manager Proxy 4.3" as the filtered product description @@ -103,10 +112,12 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Manager Proxy 4.3 x86_64" product has been added + And I wait until all synchronized channels for "suma-proxy-43" have finished @proxy @susemanager Scenario: Add SUSE Manager Retail Branch Server + Given I am authorized for the "Admin" section When I follow the left menu "Admin > Setup Wizard > Products" And I wait until I do not see "Loading" text And I enter "SUSE Manager Retail Branch Server 4.3" as the filtered product description @@ -115,6 +126,7 @@ Feature: Synchronize products in the products page of the Setup Wizard When I click the Add Product button And I wait until I see "Selected channels/products were scheduled successfully for syncing." text And I wait until I see "SUSE Manager Retail Branch Server 4.3 x86_64" product has been added + And I wait until all synchronized channels for "suma-retail-branch-server-43" have finished @scc_credentials @susemanager @@ -124,6 +136,11 @@ Feature: Synchronize products in the products page of the Setup Wizard @scc_credentials Scenario: Detect product loading issues from the UI + Given I am authorized for the "Admin" section When I follow the left menu "Admin > Setup Wizard > Products" Then I should not see a "Operation not successful" text And I should not see a warning sign + +@scc_credentials + Scenario: Trigger a refresh of the products synched from SCC + When I execute mgr-sync refresh diff --git a/testsuite/features/secondary/allcli_software_channels.feature b/testsuite/features/secondary/allcli_software_channels.feature index 71c823f0e7dd..01fad9f505d3 100644 --- a/testsuite/features/secondary/allcli_software_channels.feature +++ b/testsuite/features/secondary/allcli_software_channels.feature @@ -19,12 +19,12 @@ Feature: Channel subscription via SSM And I follow "channel memberships" in the content area Then I should see a "Base Channel" text And I should see a "Next" text - When I select "Fake Base Channel" from drop-down in table line with "SLE-Product-SLES15-SP4-Pool for x86_64" + When I select "Fake-Base-Channel" from drop-down in table line with "SLE-Product-SLES15-SP4-Pool for x86_64" And I click on "Next" Then I should see a "Child Channels" text - And I should see a "Fake Base Channel" text + And I should see a "Fake-Base-Channel" text And I should see a "1 system(s) to subscribe" text - When I choose radio button "Subscribe" for child channel "Fake Child Channel" + When I choose radio button "Subscribe" for child channel "Fake-Child-Channel" And I click on "Next" Then I should see a "Channel Changes Overview" text And I should see a "1 system(s) to subscribe" text @@ -45,12 +45,12 @@ Feature: Channel subscription via SSM And I follow "channel memberships" in the content area Then I should see a "Base Channel" text And I should see a "Next" text - When I select "Fake Base Channel" from drop-down in table line with "openSUSE Leap 15.5 (x86_64)" + When I select "Fake-Base-Channel" from drop-down in table line with "openSUSE Leap 15.5 (x86_64)" And I click on "Next" Then I should see a "Child Channels" text - And I should see a "Fake Base Channel" text + And I should see a "Fake-Base-Channel" text And I should see a "1 system(s) to subscribe" text - When I choose radio button "Subscribe" for child channel "Fake Child Channel" + When I choose radio button "Subscribe" for child channel "Fake-Child-Channel" And I click on "Next" Then I should see a "Channel Changes Overview" text And I should see a "1 system(s) to subscribe" text @@ -111,24 +111,24 @@ Feature: Channel subscription via SSM When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - Then radio button "Fake Base Channel" should be checked + Then radio button "Fake-Base-Channel" should be checked And I wait until I do not see "Loading..." text - And I should see "Fake Child Channel" as checked + And I should see "Fake-Child-Channel" as checked @sle_minion @susemanager Scenario: Check the new channels are enabled on the SLES minion When I refresh the metadata for "sle_minion" Then "2" channels should be enabled on "sle_minion" - And channel "Fake Base Channel" should be enabled on "sle_minion" - And channel "Fake Child Channel" should be enabled on "sle_minion" + And channel "Fake-Base-Channel" should be enabled on "sle_minion" + And channel "Fake-Child-Channel" should be enabled on "sle_minion" @uyuni Scenario: Check the new channels are enabled on the SLES minion When I refresh the metadata for "sle_minion" Then "2" channels should be enabled on "sle_minion" - And channel "Fake Base Channel" should be enabled on "sle_minion" - And channel "Fake Child Channel" should be enabled on "sle_minion" + And channel "Fake-Base-Channel" should be enabled on "sle_minion" + And channel "Fake-Child-Channel" should be enabled on "sle_minion" @rhlike_minion Scenario: System default channel can't be determined on the Red Hat-like minion @@ -138,7 +138,7 @@ Feature: Channel subscription via SSM Then I should see "1" systems selected for SSM When I follow the left menu "Systems > System Set Manager > Overview" And I follow "channel memberships" in the content area - And I select "System Default Base Channel" from drop-down in table line with "Fake Base Channel" + And I select "System Default Base Channel" from drop-down in table line with "Fake-Base-Channel" And I click on "Next" Then I should see a "Child Channels" text And I should see a "Couldn't determine new base channel" text @@ -158,7 +158,7 @@ Feature: Channel subscription via SSM Given I am on the Systems overview page of this "rhlike_minion" When I follow "Software" in the content area And I follow "Software Channels" in the content area - Then radio button "Fake Base Channel" should be checked + Then radio button "Fake-Base-Channel" should be checked @deblike_minion Scenario: System default channel can't be determined on the Debian-like minion @@ -168,7 +168,7 @@ Feature: Channel subscription via SSM Then I should see "1" systems selected for SSM When I follow the left menu "Systems > System Set Manager > Overview" And I follow "channel memberships" in the content area - And I select "System Default Base Channel" from drop-down in table line with "Fake-Deb-AMD64-Channel" + And I select "System Default Base Channel" from drop-down in table line with "Fake-Base-Channel-Debian-like" And I click on "Next" Then I should see a "Child Channels" text And I should see a "Couldn't determine new base channel" text @@ -188,7 +188,7 @@ Feature: Channel subscription via SSM Given I am on the Systems overview page of this "deblike_minion" When I follow "Software" in the content area And I follow "Software Channels" in the content area - Then radio button "Fake-Deb-AMD64-Channel" should be checked + Then radio button "Fake-Base-Channel-Debian-like" should be checked @sle_minion @susemanager diff --git a/testsuite/features/secondary/min_bootstrap_api.feature b/testsuite/features/secondary/min_bootstrap_api.feature index 16093bfbe6f3..1c0e3113b484 100644 --- a/testsuite/features/secondary/min_bootstrap_api.feature +++ b/testsuite/features/secondary/min_bootstrap_api.feature @@ -57,7 +57,7 @@ Feature: Register a Salt minion via API And I wait until I do not see "Loading..." text And I include the recommended child channels And I check "SLE-Module-DevTools15-SP4-Pool for x86_64" - And I check "Fake-RPM-SUSE-Channel" + And I check "Fake-RPM-SUSE-Channel" And I click on "Next" Then I should see a "Confirm Software Channel Change" text When I click on "Confirm" diff --git a/testsuite/features/secondary/min_deblike_ssh.feature b/testsuite/features/secondary/min_deblike_ssh.feature index a7136e18347f..0e2189e74f75 100644 --- a/testsuite/features/secondary/min_deblike_ssh.feature +++ b/testsuite/features/secondary/min_deblike_ssh.feature @@ -62,7 +62,7 @@ Feature: Bootstrap a SSH-managed Debian-like minion and do some basic operations When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake-Deb-AMD64-Channel" + And I check radio button "Fake-Base-Channel-Debian-like" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text @@ -117,7 +117,7 @@ Feature: Bootstrap a SSH-managed Debian-like minion and do some basic operations When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake-Deb-AMD64-Channel" + And I check radio button "Fake-Base-Channel-Debian-like" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/secondary/min_project_lotus.feature b/testsuite/features/secondary/min_project_lotus.feature index d932eec89d00..374f8136f794 100644 --- a/testsuite/features/secondary/min_project_lotus.feature +++ b/testsuite/features/secondary/min_project_lotus.feature @@ -47,9 +47,7 @@ Feature: Project Lotus And I follow "Sync" # no need to click on "Sync Now" as it's automatically enabled by default on Uyuni Then I should see a "Repository sync is running" text - - Scenario: Pre-requisite: Wait for reposync to finish - Then I wait until all spacewalk-repo-sync finished + When I wait until the channel "sles15sp4-ptfs" has been synced Scenario: Pre-requisite: Add custom channel to minion Given I am on the Systems overview page of this "sle_minion" diff --git a/testsuite/features/secondary/min_recurring_action.feature b/testsuite/features/secondary/min_recurring_action.feature index 26580f9dfc2c..3b4cfc1cc4ad 100644 --- a/testsuite/features/secondary/min_recurring_action.feature +++ b/testsuite/features/secondary/min_recurring_action.feature @@ -145,9 +145,9 @@ Feature: Recurring Actions When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake Base Channel" + And I check radio button "Fake-Base-Channel" And I wait until I do not see "Loading..." text - And I check "Fake Child Channel" + And I check "Fake-Child-Channel" And I click on "Next" Then I should see a "Confirm Software Channel Change" text When I click on "Confirm" @@ -431,7 +431,7 @@ Feature: Recurring Actions And I follow "Delete Group" And I click on "Confirm Deletion" Then I should see a "Your organization has no system groups." text - + Scenario: Cleanup: Remove "My State Channel for Recurring Actions" config channel When I follow the left menu "Configuration > Channels" And I follow "My State Channel for Recurring Actions" diff --git a/testsuite/features/secondary/min_rhlike_openscap_audit.feature b/testsuite/features/secondary/min_rhlike_openscap_audit.feature index 5d8c2dd0b343..427455cb0cc0 100644 --- a/testsuite/features/secondary/min_rhlike_openscap_audit.feature +++ b/testsuite/features/secondary/min_rhlike_openscap_audit.feature @@ -87,7 +87,7 @@ Feature: OpenSCAP audit of Red Hat-like Salt minion When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake Base Channel" + And I check radio button "Fake-Base-Channel" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/secondary/min_rhlike_salt_install_package_and_patch.feature b/testsuite/features/secondary/min_rhlike_salt_install_package_and_patch.feature index 1a9138c07e8f..fc2d79da68ba 100644 --- a/testsuite/features/secondary/min_rhlike_salt_install_package_and_patch.feature +++ b/testsuite/features/secondary/min_rhlike_salt_install_package_and_patch.feature @@ -25,7 +25,7 @@ Feature: Install a patch on the Red Hat-like minion via Salt through the UI When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake-RH-Like-Channel" + And I check radio button "Fake-Base-Channel-RH-like" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/secondary/min_rhlike_ssh.feature b/testsuite/features/secondary/min_rhlike_ssh.feature index 93860b6a6ce6..249acbb5de9d 100644 --- a/testsuite/features/secondary/min_rhlike_ssh.feature +++ b/testsuite/features/secondary/min_rhlike_ssh.feature @@ -61,7 +61,7 @@ Feature: Bootstrap a SSH-managed Red Hat-like minion and do some basic operation When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake Base Channel" + And I check radio button "Fake-Base-Channel" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text @@ -117,7 +117,7 @@ Feature: Bootstrap a SSH-managed Red Hat-like minion and do some basic operation When I follow "Software" in the content area And I follow "Software Channels" in the content area And I wait until I do not see "Loading..." text - And I check radio button "Fake Base Channel" + And I check radio button "Fake-Base-Channel" And I wait until I do not see "Loading..." text And I click on "Next" Then I should see a "Confirm Software Channel Change" text diff --git a/testsuite/features/secondary/minkvm_guests.feature b/testsuite/features/secondary/minkvm_guests.feature index b51110cd1e3c..e303619a5bd8 100644 --- a/testsuite/features/secondary/minkvm_guests.feature +++ b/testsuite/features/secondary/minkvm_guests.feature @@ -325,6 +325,13 @@ Feature: Manage KVM virtual machines via the GUI When I install package tftpboot-installation on the server And I wait for "tftpboot-installation-SLE-15-SP4-x86_64" to be installed on "server" +# TODO: Not available in any Leap repository, yet +# See https://suse.slack.com/archives/C02CKHR76Q2/p1694189245268889 +#@uyuni +# Scenario: Install TFTP boot package on the server +# And I install package tftpboot-installation on the server +# And I wait for "tftpboot-installation-openSUSE-Leap-15.5-x86_64" to be installed on "server" + @virthost_kvm Scenario: Edit a virtual network Given I am on the "Virtualization" page of this "kvm_server" diff --git a/testsuite/features/secondary/proxy_cobbler_pxeboot.feature b/testsuite/features/secondary/proxy_cobbler_pxeboot.feature index 5dc65a9e0cbe..c4840f3355cf 100644 --- a/testsuite/features/secondary/proxy_cobbler_pxeboot.feature +++ b/testsuite/features/secondary/proxy_cobbler_pxeboot.feature @@ -124,7 +124,7 @@ Feature: PXE boot a terminal with Cobbler And I follow "Software" in the content area And I follow "Install" And I enter "virgo-dummy-2.0-1.1" as the filtered package name - And I click on the filter button + And I click on the filter button And I check "virgo-dummy-2.0-1.1" in the list And I click on "Install Selected Packages" And I click on "Confirm" diff --git a/testsuite/features/secondary/srv_channel_api.feature b/testsuite/features/secondary/srv_channel_api.feature index 61ad959eadc3..3377ab9b9b49 100644 --- a/testsuite/features/secondary/srv_channel_api.feature +++ b/testsuite/features/secondary/srv_channel_api.feature @@ -36,4 +36,4 @@ Feature: API "channel" namespace and sub-namespaces Then "foobar" should not get listed with a call of listSoftwareChannels Scenario: Check last synchronization of a synced channel - Then channel "fake-i586-channel" should have attribute "yumrepo_last_sync" that is a date + Then channel "fake-base-channel-i586" should have attribute "yumrepo_last_sync" that is a date diff --git a/testsuite/features/secondary/srv_check_sync_source_packages.feature b/testsuite/features/secondary/srv_check_sync_source_packages.feature index ce50f039a3c1..90d37ef6ed47 100644 --- a/testsuite/features/secondary/srv_check_sync_source_packages.feature +++ b/testsuite/features/secondary/srv_check_sync_source_packages.feature @@ -1,8 +1,10 @@ # Copyright (c) 2018 SUSE LLC # Licensed under the terms of the MIT license. # -# requires core_srv_create_repository: -# I enable source package syncing +# requires +# - reposync/srv_create_fake_channels.feature +# - reposync/srv_create_fake_repositories.feature +# - reposync/srv_sync_fake_channels.feature @scope_configuration_channels Feature: Check if source packages were successfully synced diff --git a/testsuite/features/secondary/srv_content_lifecycle.feature b/testsuite/features/secondary/srv_content_lifecycle.feature index 150d1396e625..d495cc57d556 100644 --- a/testsuite/features/secondary/srv_content_lifecycle.feature +++ b/testsuite/features/secondary/srv_content_lifecycle.feature @@ -139,9 +139,9 @@ Feature: Content lifecycle Then I should see a "Build (0)" text When I click on "Attach/Detach Sources" And I uncheck "Vendors" - And I add the "Fake Base Channel" channel to sources + And I add the "Fake-Base-Channel" channel to sources And I click on "Save" - Then I wait until I see "Fake Base Channel" text + Then I wait until I see "Fake-Base-Channel" text And I wait until I see "Build (1)" text And I should see a "Version 2: (draft - not built) - Check the changes below" text When I click on "Build (1)" @@ -171,11 +171,11 @@ Feature: Content lifecycle @susemanager Scenario: Cleanup: remove the created channels When I delete these channels with spacewalk-remove-channel: - |clp_label-prod_label-fake_base_channel| + |clp_label-prod_label-fake-base-channel| |clp_label-prod_label-sle-product-sles15-sp4-updates-x86_64| - |clp_label-qa_label-fake_base_channel| + |clp_label-qa_label-fake-base-channel| |clp_label-qa_label-sle-product-sles15-sp4-updates-x86_64| - |clp_label-dev_label-fake_base_channel| + |clp_label-dev_label-fake-base-channel| |clp_label-dev_label-sle-product-sles15-sp4-updates-x86_64| And I delete these channels with spacewalk-remove-channel: |clp_label-prod_label-sle-product-sles15-sp4-pool-x86_64| @@ -187,11 +187,11 @@ Feature: Content lifecycle @uyuni Scenario: Cleanup: remove the created channels When I delete these channels with spacewalk-remove-channel: - |clp_label-prod_label-fake_base_channel| - |clp_label-prod_label-opensuse_leap15_5-x86_64| - |clp_label-qa_label-fake_base_channel| - |clp_label-qa_label-opensuse_leap15_5-x86_64| - |clp_label-dev_label-fake_base_channel| - |clp_label-dev_label-opensuse_leap15_5-x86_64| + | clp_label-prod_label-fake-base-channel | + | clp_label-prod_label-opensuse_leap15_5-x86_64 | + | clp_label-qa_label-fake-base-channel | + | clp_label-qa_label-opensuse_leap15_5-x86_64 | + | clp_label-dev_label-fake-base-channel | + | clp_label-dev_label-opensuse_leap15_5-x86_64 | And I list channels with spacewalk-remove-channel Then I shouldn't get "clp_label" diff --git a/testsuite/features/secondary/srv_delete_channel_from_ui.feature b/testsuite/features/secondary/srv_delete_channel_from_ui.feature index 039a20685eab..b62c2ca06370 100644 --- a/testsuite/features/secondary/srv_delete_channel_from_ui.feature +++ b/testsuite/features/secondary/srv_delete_channel_from_ui.feature @@ -8,7 +8,7 @@ # If the deletion of "Clone of Fake-RPM-SUSE-Channel" fails, these features will have failing scenarios. # - features/secondary/srv_dist_channel_mapping.feature # - features/secondary/srv_patches_page.feature -# If the deletion of "Clone of Fake Base Channel" fails, these features will have failing scenarios. +# If the deletion of "Clone of Fake-Base-Channel" fails, these features will have failing scenarios. @scope_configuration_channels Feature: Delete channels with child or clone is not allowed @@ -21,39 +21,39 @@ Feature: Delete channels with child or clone is not allowed Scenario: Clone the first channel before deletion from UI test When I follow the left menu "Software > Manage > Channels" And I follow "Clone Channel" - And I select "Fake Base Channel" as the origin channel + And I select "Fake-Base-Channel" as the origin channel And I click on "Clone Channel" Then I should see a "Create Software Channel" text And I should see a "Current state of the channel" text When I click on "Clone Channel" - Then I should see a "Clone of Fake Base Channel" text + Then I should see a "Clone of Fake-Base-Channel" text Scenario: Clone the second channel using first channel as base When I follow the left menu "Software > Manage > Channels" And I follow "Clone Channel" - And I select "Clone of Fake Base Channel" as the origin channel + And I select "Clone of Fake-Base-Channel" as the origin channel And I click on "Clone Channel" Then I should see a "Create Software Channel" text And I should see a "Current state of the channel" text When I click on "Clone Channel" - Then I should see a "Clone of Clone of Fake Base Channel" text + Then I should see a "Clone of Clone of Fake-Base-Channel" text Scenario: Try to delete channel with clone When I follow the left menu "Software > Manage > Channels" - And I follow "Clone of Fake Base Channel" + And I follow "Clone of Fake-Base-Channel" And I follow "Delete software channel" And I check "unsubscribeSystems" And I click on "Delete Channel" - Then I should see a "Clone of Fake Base Channel" text + Then I should see a "Clone of Fake-Base-Channel" text And I should see a "Unable to delete channel" text Scenario: Delete channel without clones neither children When I follow the left menu "Software > Manage > Channels" - And I follow "Clone of Clone of Fake Base Channel" + And I follow "Clone of Clone of Fake-Base-Channel" And I follow "Delete software channel" And I check "unsubscribeSystems" And I click on "Delete Channel" - Then I should see a "Clone of Clone of Fake Base Channel" text + Then I should see a "Clone of Clone of Fake-Base-Channel" text And I should see a "has been deleted" text Scenario: Clone a child channel to the clone of x86_64 test channel @@ -63,17 +63,17 @@ Feature: Delete channels with child or clone is not allowed And I click on "Clone Channel" Then I should see a "Create Software Channel" text And I should see a "Current state of the channel" text - When I select "Clone of Fake Base Channel" from "Parent Channel" + When I select "Clone of Fake-Base-Channel" from "Parent Channel" And I click on "Clone Channel" Then I should see a "Clone of Fake-RPM-SUSE-Channel" text Scenario: Try delete channel with child When I follow the left menu "Software > Manage > Channels" - And I follow "Clone of Fake Base Channel" + And I follow "Clone of Fake-Base-Channel" And I follow "Delete software channel" And I check "unsubscribeSystems" And I click on "Delete Channel" - Then I should see a "Clone of Fake Base Channel" text + Then I should see a "Clone of Fake-Base-Channel" text And I should see a "channel has child channels associated" text And I should see a "must delete those channels first before deleting the parent." text @@ -88,9 +88,9 @@ Feature: Delete channels with child or clone is not allowed Scenario: Cleanup: remove cloned parent channel When I follow the left menu "Software > Manage > Channels" - And I follow "Clone of Fake Base Channel" + And I follow "Clone of Fake-Base-Channel" And I follow "Delete software channel" And I check "unsubscribeSystems" And I click on "Delete Channel" - Then I should see a "Clone of Fake Base Channel" text + Then I should see a "Clone of Fake-Base-Channel" text And I should see a "has been deleted." text diff --git a/testsuite/features/secondary/srv_dist_channel_mapping.feature b/testsuite/features/secondary/srv_dist_channel_mapping.feature index 4f01f6a05494..7e18c28439d1 100644 --- a/testsuite/features/secondary/srv_dist_channel_mapping.feature +++ b/testsuite/features/secondary/srv_dist_channel_mapping.feature @@ -49,7 +49,7 @@ Feature: Distribution Channel Mapping When I enter "Ubuntu 22.04.01 LTS" as "os" And I enter "22.04" as "release" And I select "x86_64" from "architecture" dropdown - And I select "Fake Base Channel" from "channel_label" dropdown + And I select "Fake-Base-Channel" from "channel_label" dropdown And I click on "Create Mapping" Then I should see a "Ubuntu 22.04.01 LTS" link in the content area @@ -61,7 +61,7 @@ Feature: Distribution Channel Mapping When I enter "SUSE Linux Enterprise Server 15 SP 4 iSeries" as "os" And I enter "15.5" as "release" And I select "iSeries" from "architecture" dropdown - And I select "Fake-i586-Channel" from "channel_label" dropdown + And I select "Fake-Base-Channel-i586" from "channel_label" dropdown And I click on "Create Mapping" Then I should see a "SUSE Linux Enterprise Server 15 SP 4 iSeries" link in the content area @@ -101,23 +101,23 @@ Feature: Distribution Channel Mapping And I should see the text "sle-product-sles15-sp4-pool-x86_64" in the Channel Label field When I follow "Ubuntu 22.04.01 LTS" And I enter "Ubuntu 22.04.01 LTS modified" as "os" - And I select "Fake Base Channel" from "channel_label" dropdown + And I select "Fake-Base-Channel" from "channel_label" dropdown And I click on "Update Mapping" Then I should see the text "Ubuntu 22.04.01 LTS modified" in the Operating System field - And I should see the text "fake_base_channel" in the Channel Label field + And I should see the text "fake-base-channel" in the Channel Label field @scc_credentials Scenario: Update map for IA-32 SUSE clients using amd deb test channel When I follow the left menu "Software > Distribution Channel Mapping" Then I should see the text "SUSE Linux Enterprise Server 15 SP 4 iSeries" in the Operating System field And I should see the text "iSeries" in the Architecture field - And I should see the text "fake-i586-channel" in the Channel Label field + And I should see the text "fake-base-channel-i586" in the Channel Label field When I follow "SUSE Linux Enterprise Server 15 SP 4 iSeries" And I enter "SUSE Linux Enterprise Server 15 SP 4 iSeries modified" as "os" - And I select "Fake-Deb-AMD64-Channel" from "channel_label" dropdown + And I select "Fake-Base-Channel-Debian-like" from "channel_label" dropdown And I click on "Update Mapping" Then I should see the text "SUSE Linux Enterprise Server 15 SP 4 iSeries modified" in the Operating System field - And I should see the text "fake-deb-amd64-channel" in the Channel Label field + And I should see the text "fake-base-channel-debian-like" in the Channel Label field @scc_credentials @susemanager @@ -145,7 +145,7 @@ Feature: Distribution Channel Mapping Then I should see a "Delete Distribution Channel Map" text When I click on "Delete Mapping" Then I should not see a "openSUSE Leap 15.5 modified" link - + Scenario: Cleanup: delete the map created for x68_64 Ubuntu clients When I follow the left menu "Software > Distribution Channel Mapping" Then I should see the text "Ubuntu 22.04.01 LTS modified" in the Operating System field @@ -157,7 +157,7 @@ Feature: Distribution Channel Mapping Then I should see a "Delete Distribution Channel Map" text When I click on "Delete Mapping" Then I should not see a "Ubuntu 22.04.01 LTS modified" link - + @scc_credentials Scenario: Cleanup: delete the map created for i586 clients When I follow the left menu "Software > Distribution Channel Mapping" diff --git a/testsuite/features/secondary/srv_manage_activationkey.feature b/testsuite/features/secondary/srv_manage_activationkey.feature index bb2a35a25369..70dd4fde525c 100644 --- a/testsuite/features/secondary/srv_manage_activationkey.feature +++ b/testsuite/features/secondary/srv_manage_activationkey.feature @@ -33,7 +33,7 @@ Feature: Manipulate activation keys When I follow the left menu "Systems > Activation Keys" And I follow "SUSE Test Key i586" And I wait until I do not see "Loading..." text - And I select "Fake-i586-Channel" from "selectedBaseChannel" + And I select "Fake-Base-Channel-i586" from "selectedBaseChannel" And I click on "Update Activation Key" Then I should see a "Activation key SUSE Test Key i586 has been modified." text @@ -52,7 +52,7 @@ Feature: Manipulate activation keys And I enter "SUSE Test PKG Key i586" as "description" And I enter "SUSE-TEST-2-i586" as "key" And I enter "20" as "usageLimit" - And I select "Fake-i586-Channel" from "selectedBaseChannel" + And I select "Fake-Base-Channel-i586" from "selectedBaseChannel" And I click on "Create Activation Key" And I follow "Packages" And I enter "sed" as "packages" diff --git a/testsuite/features/secondary/srv_manage_channels_page.feature b/testsuite/features/secondary/srv_manage_channels_page.feature index 70110a5ec99c..843a1665003f 100644 --- a/testsuite/features/secondary/srv_manage_channels_page.feature +++ b/testsuite/features/secondary/srv_manage_channels_page.feature @@ -13,14 +13,14 @@ Feature: Managing channels Scenario: Fail when trying to add a duplicate channel When I follow the left menu "Software > Manage > Channels" And I follow "Create Channel" - And I enter "Fake Base Channel" as "Channel Name" - And I enter "fake_base_channel" as "Channel Label" + And I enter "Fake-Base-Channel" as "Channel Name" + And I enter "fake-base-channel" as "Channel Label" And I select "None" from "Parent Channel" And I select "x86_64" from "Architecture:" And I enter "Base channel for testing" as "Channel Summary" And I enter "No more desdcription for base channel." as "Channel Description" And I click on "Create Channel" - Then I should see a "The channel name 'Fake Base Channel' is already in use, please enter a different name" text + Then I should see a "The channel name 'Fake-Base-Channel' is already in use, please enter a different name" text Scenario: Fail when trying to use invalid characters in the channel label When I follow the left menu "Software > Manage > Channels" @@ -39,7 +39,7 @@ Feature: Managing channels And I enter "test123" as "Channel Summary" And I click on "Create Channel" Then I should see a "Invalid channel name, please see the format described below" text - + @scc_credentials Scenario: Fail when trying to use reserved names for channels When I follow the left menu "Software > Manage > Channels" diff --git a/testsuite/features/secondary/srv_patches_page.feature b/testsuite/features/secondary/srv_patches_page.feature index e8b8796e0e01..d8589cf320fe 100644 --- a/testsuite/features/secondary/srv_patches_page.feature +++ b/testsuite/features/secondary/srv_patches_page.feature @@ -80,7 +80,7 @@ Feature: Patches page And I should see a "Test Topic" text And I should see a "Test Description" text And I should see a "Test Solution" text - And I should see a "Fake Base Channel" link + And I should see a "Fake-Base-Channel" link And I should see a "Test Summary" link And I should see a "keywords, test" text And I should see a "Test Reference" text @@ -88,7 +88,7 @@ Feature: Patches page Scenario: Assert that patch is now in test base channel When I follow the left menu "Software > Channel List > All" - And I follow "Fake Base Channel" + And I follow "Fake-Base-Channel" And I follow "Patches" in the content area Then I should see a "Test Patch" text diff --git a/testsuite/features/secondary/srv_push_package.feature b/testsuite/features/secondary/srv_push_package.feature index 58cfe0fae770..e1dde2fcd3c8 100644 --- a/testsuite/features/secondary/srv_push_package.feature +++ b/testsuite/features/secondary/srv_push_package.feature @@ -11,12 +11,12 @@ Feature: Push a package with unset vendor Scenario: Push a package with unset vendor When I copy unset package file on server - And I push package "/root/subscription-tools-1.0-0.noarch.rpm" into "fake_base_channel" channel - Then I should see package "subscription-tools-1.0-0.noarch" in channel "Fake Base Channel" + And I push package "/root/subscription-tools-1.0-0.noarch.rpm" into "fake-base-channel" channel + Then I should see package "subscription-tools-1.0-0.noarch" in channel "Fake-Base-Channel" Scenario: Check vendor of package displayed in web UI When I follow the left menu "Software > Channel List > All" - And I follow "Fake Base Channel" + And I follow "Fake-Base-Channel" And I follow "Packages" And I follow "subscription-tools-1.0-0.noarch" Then I should see a "Vendor:" text diff --git a/testsuite/features/step_definitions/api_common.rb b/testsuite/features/step_definitions/api_common.rb index 243ab10c6c8c..092b88e82d9a 100644 --- a/testsuite/features/step_definitions/api_common.rb +++ b/testsuite/features/step_definitions/api_common.rb @@ -504,7 +504,7 @@ def wait_action_complete(actionid, timeout: DEFAULT_TIMEOUT) arch = `uname -m` arch.chomp! channel = if arch != 'x86_64' - 'fake-i586-channel' + 'fake-base-channel-i586' else 'fake-rpm-suse-channel' end @@ -599,13 +599,13 @@ def wait_action_complete(actionid, timeout: DEFAULT_TIMEOUT) end When(/^I create a kickstart tree via the API$/) do - $api_test.kickstart.tree.create_distro('fedora_kickstart_distro_api', '/var/autoinstall/Fedora_12_i386/', 'fake-rh-like-channel', 'fedora18') + $api_test.kickstart.tree.create_distro('fedora_kickstart_distro_api', '/var/autoinstall/Fedora_12_i386/', 'fake-base-channel-rh-like', 'fedora18') end When(/^I create a kickstart tree with kernel options via the API$/) do - $api_test.kickstart.tree.create_distro_w_kernel_options('fedora_kickstart_distro_kernel_api', '/var/autoinstall/Fedora_12_i386/', 'fake-rh-like-channel', 'fedora18', 'self_update=0', 'self_update=1') + $api_test.kickstart.tree.create_distro_w_kernel_options('fedora_kickstart_distro_kernel_api', '/var/autoinstall/Fedora_12_i386/', 'fake-base-channel-rh-like', 'fedora18', 'self_update=0', 'self_update=1') end When(/^I update a kickstart tree via the API$/) do - $api_test.kickstart.tree.update_distro('fedora_kickstart_distro_api', '/var/autoinstall/Fedora_12_i386/', 'fake-rh-like-channel', 'generic_rpm', 'self_update=0', 'self_update=1') + $api_test.kickstart.tree.update_distro('fedora_kickstart_distro_api', '/var/autoinstall/Fedora_12_i386/', 'fake-base-channel-rh-like', 'generic_rpm', 'self_update=0', 'self_update=1') end diff --git a/testsuite/features/step_definitions/command_steps.rb b/testsuite/features/step_definitions/command_steps.rb index b2bb6d284a5b..f307b93a3a01 100644 --- a/testsuite/features/step_definitions/command_steps.rb +++ b/testsuite/features/step_definitions/command_steps.rb @@ -118,13 +118,13 @@ # Channels -When(/^I delete these channels with spacewalk\-remove\-channel:$/) do |table| +When(/^I delete these channels with spacewalk-remove-channel:$/) do |table| channels_cmd = 'spacewalk-remove-channel ' table.raw.each { |x| channels_cmd = channels_cmd + ' -c ' + x[0] } $command_output, return_code = get_target('server').run(channels_cmd, check_errors: false) end -When(/^I list channels with spacewalk\-remove\-channel$/) do +When(/^I list channels with spacewalk-remove-channel$/) do $command_output, return_code = get_target('server').run('spacewalk-remove-channel -l') raise 'Unable to run spacewalk-remove-channel -l command on server' unless return_code.zero? end @@ -133,14 +133,13 @@ get_target('server').run("echo -e \"admin\nadmin\n\" | mgr-sync add channel #{channel}", buffer_size: 1_000_000) end -When(/^I use spacewalk\-common\-channel to add channel "([^"]*)" with arch "([^"]*)"$/) do |child_channel, arch| +When(/^I use spacewalk-common-channel to add channel "([^"]*)" with arch "([^"]*)"$/) do |child_channel, arch| command = "spacewalk-common-channels -u admin -p admin -a #{arch} #{child_channel}" $command_output, _code = get_target('server').run(command) end -When(/^I use spacewalk\-repo\-sync to sync channel "([^"]*)"$/) do |channel| - command = "spacewalk-repo-sync -c #{channel}" - $command_output, _code = get_target('server').run(command) +When(/^I use spacewalk-repo-sync to sync channel "([^"]*)"$/) do |channel| + $command_output, _code = get_target('server').run_until_ok("spacewalk-repo-sync -c #{channel}") end Then(/^I should get "([^"]*)"$/) do |value| @@ -298,16 +297,16 @@ raise $command_output.to_s unless executed end -When(/^I execute mgr\-sync "([^"]*)" with user "([^"]*)" and password "([^"]*)"$/) do |arg1, u, p| +When(/^I execute mgr-sync "([^"]*)" with user "([^"]*)" and password "([^"]*)"$/) do |arg1, u, p| get_target('server').run("echo -e \'mgrsync.user = \"#{u}\"\nmgrsync.password = \"#{p}\"\n\' > ~/.mgr-sync") - $command_output, _code = get_target('server').run("mgr-sync #{arg1}", check_errors: false, buffer_size: 1_000_000) + $command_output, _code = get_target('server').run("echo -e '#{u}\n#{p}\n' | mgr-sync #{arg1}", check_errors: false, buffer_size: 1_000_000) end -When(/^I execute mgr\-sync "([^"]*)"$/) do |arg1| +When(/^I execute mgr-sync "([^"]*)"$/) do |arg1| $command_output, _code = get_target('server').run("mgr-sync #{arg1}", buffer_size: 1_000_000) end -When(/^I remove the mgr\-sync cache file$/) do +When(/^I remove the mgr-sync cache file$/) do $command_output, _code = get_target('server').run('rm -f ~/.mgr-sync') end @@ -316,72 +315,43 @@ get_target('server').run('echo -e "admin\nadmin\n" | mgr-sync refresh', timeout: refresh_timeout) end -When(/^I execute mgr\-sync refresh$/) do +When(/^I execute mgr-sync refresh$/) do $command_output, _code = get_target('server').run('mgr-sync refresh', check_errors: false) end -# This function waits for all the reposyncs to complete. -# -# This function is written as a state machine. It bails out if no process is seen during -# 60 seconds in a row. -When(/^I wait until all spacewalk\-repo\-sync finished$/) do - reposync_not_running_streak = 0 - reposync_left_running_streak = 0 - while reposync_not_running_streak <= 60 - command_output, _code = get_target('server').run('ps axo pid,cmd | grep spacewalk-repo-sync | grep -v grep', check_errors: false) - if command_output.empty? - reposync_not_running_streak += 1 - reposync_left_running_streak = 0 - sleep 1 - next - end - reposync_not_running_streak = 0 - - process = command_output.split("\n")[0] - channel = process.split(' ')[5] - log "Reposync of channel #{channel} left running" if (reposync_left_running_streak % 60).zero? - reposync_left_running_streak += 1 - sleep 1 - end -end - -# This function kills all spacewalk-repo-sync processes, excepted the ones in a whitelist. +# This function kills spacewalk-repo-sync processes for a particular OS product version. # It waits for all the reposyncs in the whitelist to complete, and kills all others. -# -# This function is written as a state machine. It bails out if no process is seen during -# 60 seconds in a row, or if the whitelisted reposyncs last more than 7200 seconds in a row. -When(/^I kill all running spacewalk\-repo\-sync, excepted the ones needed to bootstrap$/) do - do_not_kill = compute_channels_to_leave_running - reposync_not_running_streak = 0 - reposync_left_running_streak = 0 - while reposync_not_running_streak <= 60 - command_output, _code = get_target('server').run('ps axo pid,cmd | grep spacewalk-repo-sync | grep -v grep', check_errors: false, verbose: true) - if command_output.empty? - log "Empty command!" - reposync_not_running_streak += 1 - reposync_left_running_streak = 0 - sleep 1 - next - end - reposync_not_running_streak = 0 - +When(/^I kill running spacewalk-repo-sync for "([^"]*)"$/) do |os_product_version| + next if CHANNEL_TO_SYNCH_BY_OS_PRODUCT_VERSION[os_product_version].nil? + channels_to_kill = sanitize_client_tools(CHANNEL_TO_SYNCH_BY_OS_PRODUCT_VERSION[os_product_version]) + log "Killing channels:\n#{channels_to_kill}" + time_spent = 0 + checking_rate = 10 + repeat_until_timeout(timeout: 900, message: 'Some reposync processes were not killed properly', dont_raise: true) do + # Kill a reposync process if it is running for a channel that is in the list to kill + command_output, _code = get_target('server').run('ps axo pid,cmd | grep spacewalk-repo-sync | grep -v grep', check_errors: false) process = command_output.split("\n")[0] - channel = process.split(' ')[5] - log "Processing channel '#{channel}'" - if do_not_kill.include? channel - $channels_synchronized.add(channel) - log "Reposync of channel #{channel} left running" if (reposync_left_running_streak % 60).zero? - reposync_left_running_streak += 1 - - raise 'We have a reposync process that still running after 2 hours' if reposync_left_running_streak > 7200 - sleep 1 + if process.nil? + log "#{time_spent / 60.to_i} minutes waiting for '#{os_product_version}' remaining channels to start their repo-sync processes:\n#{channels_to_kill}" if ((time_spent += checking_rate) % 60).zero? + sleep checking_rate next end - reposync_left_running_streak = 0 - + channel = process.split(' ')[5].strip + log "Repo-sync process for channel '#{channel}' running." if Time.now.sec % 5 + next unless CHANNEL_TO_SYNCH_BY_OS_PRODUCT_VERSION[os_product_version].include? channel + channels_to_kill.delete(channel) pid = process.split(' ')[0] get_target('server').run("kill #{pid}", check_errors: false) log "Reposync of channel #{channel} killed" + + # Remove from the list to kill those channels that are already synced + channels_to_kill.each do |remaining_channel| + if channel_is_synced(remaining_channel) + log "Channel '#{remaining_channel}' is already synced, so there is no need to kill repo-sync process." + channels_to_kill.delete(remaining_channel) + end + end + break if channels_to_kill.empty? end end @@ -402,56 +372,45 @@ end Then(/^"([^"]*)" package should have been stored$/) do |pkg| - get_target('server').run("find /var/spacewalk/packages -name #{pkg}") + get_target('server').run("find /var/spacewalk/packages -name #{pkg}", verbose: true) end Then(/^solver file for "([^"]*)" should reference "([^"]*)"$/) do |channel, pkg| repeat_until_timeout(timeout: 600, message: "Reference #{pkg} not found in file.") do - _result, code = get_target('server').run("dumpsolv /var/cache/rhn/repodata/#{channel}/solv | grep #{pkg}", check_errors: false) + _result, code = get_target('server').run("dumpsolv /var/cache/rhn/repodata/#{channel}/solv | grep #{pkg}", verbose: true, check_errors: false) break if code.zero? end end -When(/^I wait until the channel "([^"]*)" has been synced([^"]*)$/) do |channel, withpkg| +When(/^I wait until the channel "([^"]*)" has been synced$/) do |channel| + time_spent = 0 + checking_rate = 10 begin repeat_until_timeout(timeout: 7200, message: 'Channel not fully synced') do - # solv is the last file to be written when the server synchronizes a channel, - # therefore we wait until it exist - _result, code = get_target('server').run("test -f /var/cache/rhn/repodata/#{channel}/solv", check_errors: false) - if code.zero? - # We want to check if no .new files exists. - # On a re-sync, the old files stay, the new one have this suffix until it's ready. - _result, new_code = get_target('server').run("test -f /var/cache/rhn/repodata/#{channel}/solv.new", check_errors: false) - unless new_code.zero? - break if withpkg.empty? - _result, solv_code = get_target('server').run("dumpsolv /var/cache/rhn/repodata/#{channel}/solv | grep 'repo size: 0 solvables'", check_errors: false) - break unless solv_code.zero? - end - else - # maybe a debian repo? - _result, code = get_target('server').run("test -f /var/cache/rhn/repodata/#{channel}/Release", check_errors: false) - if code.zero? - break if withpkg.empty? - _result, solv_code = get_target('server').run("test -s /var/cache/rhn/repodata/#{channel}/Packages", check_errors: false) - break if solv_code.zero? - end - end - log "I am still waiting for '#{channel}' channel to be synchronized." - sleep 10 + break if channel_is_synced(channel) + log "#{time_spent / 60.to_i} minutes waiting for '#{channel}' channel to be synchronized." if ((time_spent += checking_rate) % 60).zero? + sleep checking_rate end rescue StandardError => e log e.message # It might be that the MU repository is wrong, but we want to continue in any case end end -When(/I wait until all synchronized channels have finished$/) do +When(/^I wait until all synchronized channels have finished$/) do $channels_synchronized.each do |channel| log "I wait until '#{channel}' synchronized channel has finished" step %(I wait until the channel "#{channel}" has been synced) end end -When(/^I execute mgr\-bootstrap "([^"]*)"$/) do |arg1| +When(/^I wait until all synchronized channels for "([^"]*)" have finished$/) do |product_os_version| + channels_to_wait = sanitize_client_tools(CHANNEL_TO_SYNCH_BY_OS_PRODUCT_VERSION[product_os_version]) + channels_to_wait.each do |channel| + step %(I wait until the channel "#{channel}" has been synced) + end +end + +When(/^I execute mgr-bootstrap "([^"]*)"$/) do |arg1| $command_output, _code = get_target('server').run("mgr-bootstrap #{arg1}") end @@ -783,16 +742,18 @@ check_restart(system_name, get_target(host), reboot_timeout) end -When(/^I call spacewalk\-repo\-sync for channel "(.*?)" with a custom url "(.*?)"$/) do |arg1, arg2| - @command_output, _code = get_target('server').run("spacewalk-repo-sync -c #{arg1} -u #{arg2}", check_errors: false) +When(/^I call spacewalk-repo-sync for channel "(.*?)" with a custom url "(.*?)"$/) do |arg1, arg2| + # Notice that we are calling it until ok because we might collide with other running process of spacewalk-repo-sync, + # and it can only run one process at a time. + @command_output, _code = get_target('server').run_until_ok("spacewalk-repo-sync -c #{arg1} -u #{arg2}") end -When(/^I call spacewalk\-repo\-sync to sync the channel "(.*?)"$/) do |channel| - @command_output, _code = get_target('server').run("spacewalk-repo-sync -c #{channel}", check_errors: false) +When(/^I call spacewalk-repo-sync to sync the channel "(.*?)"$/) do |channel| + @command_output, _code = get_target('server').run_until_ok("spacewalk-repo-sync -c #{channel}") end -When(/^I call spacewalk\-repo\-sync to sync the parent channel "(.*?)"$/) do |channel| - @command_output, _code = get_target('server').run("spacewalk-repo-sync -p #{channel}", check_errors: false) +When(/^I call spacewalk-repo-sync to sync the parent channel "(.*?)"$/) do |channel| + @command_output, _code = get_target('server').run_until_ok("spacewalk-repo-sync -p #{channel}") end When(/^I get "(.*?)" file details for channel "(.*?)" via spacecmd$/) do |arg1, arg2| diff --git a/testsuite/features/step_definitions/content_lifecycle_steps.rb b/testsuite/features/step_definitions/content_lifecycle_steps.rb index 3ab32366403c..b2f2e636824a 100644 --- a/testsuite/features/step_definitions/content_lifecycle_steps.rb +++ b/testsuite/features/step_definitions/content_lifecycle_steps.rb @@ -70,7 +70,7 @@ raise 'error backing up authorized_keys on host' if ret_code.nonzero? end -When(/^I add pre\-generated SSH public key to authorized_keys of host "([^"]*)"$/) do |host| +When(/^I add pre-generated SSH public key to authorized_keys of host "([^"]*)"$/) do |host| key_filename = 'id_rsa_bootstrap-passphrase_linux.pub' target = get_target(host) ret_code = file_inject( diff --git a/testsuite/features/step_definitions/navigation_steps.rb b/testsuite/features/step_definitions/navigation_steps.rb index b2e82bf27426..b4d11f32ae23 100644 --- a/testsuite/features/step_definitions/navigation_steps.rb +++ b/testsuite/features/step_definitions/navigation_steps.rb @@ -90,10 +90,10 @@ When(/^I wait at most (\d+) seconds until the event is completed, refreshing the page$/) do |timeout| last = Time.now - next if has_content?("This action's status is: Completed.", wait: 3) + next if has_content?('This action\'s status is: Completed.', wait: 3) repeat_until_timeout(timeout: timeout.to_i, message: 'Event not yet completed') do - break if has_content?("This action's status is: Completed.", wait: 3) - raise 'Event failed' if has_content?("This action's status is: Failed.", wait: 3) + break if has_content?('This action\'s status is: Completed.', wait: 3) + raise 'Event failed' if has_content?('This action\'s status is: Failed.', wait: 3) current = Time.now if current - last > 150 log "#{current} Still waiting for action to complete..." @@ -202,7 +202,8 @@ end When(/^I select the parent channel for the "([^"]*)" from "([^"]*)"$/) do |client, from| - select(BASE_CHANNEL_BY_CLIENT[product][client], from: from, exact: false) + product_key = $is_container_provider ? 'Fake' : product + select(BASE_CHANNEL_BY_CLIENT[product_key][client], from: from, exact: false) end When(/^I select "([^"]*)" from drop-down in table line with "([^"]*)"$/) do |value, line| @@ -225,13 +226,13 @@ When(/^I (include|exclude) the recommended child channels$/) do |action| toggle = "//span[@class='pointer']" - step %(I wait at most 10 seconds until I see "include recommended" text) + step 'I wait at most 10 seconds until I see "include recommended" text' raise 'The toggle is not present' unless page.has_xpath?(toggle, wait: 5) if action == 'include' - toggle_off = "//i[contains(@class, 'fa-toggle-off')]" + toggle_off = '//i[contains(@class, \'fa-toggle-off\')]' find(:xpath, toggle).click if page.has_xpath?(toggle_off, wait: 5) else - toggle_on = "//i[contains(@class, 'fa-toggle-on')]" + toggle_on = '//i[contains(@class, \'fa-toggle-on\')]' find(:xpath, toggle).click if page.has_xpath?(toggle_on, wait: 5) end end @@ -300,7 +301,7 @@ step %(I click on "#{text}") end rescue Capybara::ModalNotFound - # ignored + warn 'Modal not found' end end @@ -365,8 +366,8 @@ menu_levels = menu_path.split('>').map(&:strip) # define reusable patterns - prefix_path = "//aside/div[@id='nav']/nav" - link_path = "/ul/li/div/a[contains(.,'%s')]" + prefix_path = '//aside/div[@id=\'nav\']/nav' + link_path = '/ul/li/div/a[contains(.,\'%s\')]' parent_wrapper_path = '/parent::div' parent_level_path = '/parent::li' @@ -379,8 +380,14 @@ # if this is the last element of the path break if index == (menu_levels.count - 1) # open the submenu if needed - unless find(:xpath, target_link_path + parent_wrapper_path + parent_level_path)[:class].include?('open') - find(:xpath, target_link_path + parent_wrapper_path).click + begin + unless find(:xpath, target_link_path + parent_wrapper_path + parent_level_path)[:class].include?('open') + find(:xpath, target_link_path + parent_wrapper_path).click + end + rescue NoMethodError + warn 'The browser session seems broken. See debug details below:' + warn "target_link_path=#{target_link_path}, parent_wrapper_path=#{parent_wrapper_path}, parent_level_path=#{parent_level_path}" + step 'I am authorized for the "Admin" section' end # point the target to the current menu level target_link_path += parent_wrapper_path + parent_level_path @@ -398,6 +405,7 @@ page.reset! rescue NoMethodError log 'The browser session could not be cleaned.' + capybara_register_driver ensure visit Capybara.app_host end @@ -531,14 +539,20 @@ page.reset! rescue NoMethodError => e log "The browser session could not be cleaned because there is no browser available: #{e.message}" + capybara_register_driver rescue StandardError => e log "The browser session could not be cleaned for unknown issue: #{e.message}" + capybara_register_driver ensure visit Capybara.app_host end next if all(:xpath, "//header//span[text()='#{user}']", wait: 0).any? - find(:xpath, '//header//i[@class=\'fa fa-sign-out\']').click if all(:xpath, '//header//i[@class=\'fa fa-sign-out\']', wait: 0).any? + begin + find(:xpath, '//header//i[@class=\'fa fa-sign-out\']').click + rescue Capybara::ElementNotFound, NoMethodError + # No need to logout + end raise 'Login page is not correctly loaded' unless has_field?('username') fill_in('username', with: user) @@ -580,7 +594,7 @@ end When(/^I check test channel$/) do - step 'I check "Fake Base Channel" in the list' + step 'I check "Fake-Base-Channel" in the list' end When(/^I check "([^"]*)" patch$/) do |arg1| @@ -951,11 +965,11 @@ # # Test if a checkbox is disabled # -Then(/^the "([^\"]*)" checkbox should be disabled$/) do |arg1| +Then(/^the "([^"]*)" checkbox should be disabled$/) do |arg1| has_css?("##{arg1}[disabled]") end -Then(/^the "([^\"]*)" field should be disabled$/) do |arg1| +Then(/^the "([^"]*)" field should be disabled$/) do |arg1| has_css?("##{arg1}[disabled]") end diff --git a/testsuite/features/step_definitions/salt_steps.rb b/testsuite/features/step_definitions/salt_steps.rb index 6ab7a29e3011..92b5b78df7bb 100644 --- a/testsuite/features/step_definitions/salt_steps.rb +++ b/testsuite/features/step_definitions/salt_steps.rb @@ -134,12 +134,12 @@ get_target('server').run("salt #{system_name} state.apply #{state}", verbose: true) end -Then(/^salt\-api should be listening on local port (\d+)$/) do |port| +Then(/^salt-api should be listening on local port (\d+)$/) do |port| $output, _code = get_target('server').run("ss -ntl | grep #{port}") assert_match(/127.0.0.1:#{port}/, $output) end -Then(/^salt\-master should be listening on public port (\d+)$/) do |port| +Then(/^salt-master should be listening on public port (\d+)$/) do |port| $output, _code = get_target('server').run("ss -ntl | grep #{port}") assert_match(/(0.0.0.0|\*|\[::\]):#{port}/, $output) end diff --git a/testsuite/features/step_definitions/setup_steps.rb b/testsuite/features/step_definitions/setup_steps.rb index 87235593dece..89a0cc481f9d 100644 --- a/testsuite/features/step_definitions/setup_steps.rb +++ b/testsuite/features/step_definitions/setup_steps.rb @@ -110,9 +110,13 @@ raise "xpath: #{xpath_query} not found" unless find(:xpath, xpath_query, wait: timeout.to_i) end -When(/^I open the sub-list of the product "(.*?)"$/) do |product| +When(/^I open the sub-list of the product "(.*?)"((?: if present)?)$/) do |product, if_present| xpath = "//span[contains(text(), '#{product}')]/ancestor::div[contains(@class, 'product-details-wrapper')]/div/i[contains(@class, 'fa-angle-right')]" - raise "xpath: #{xpath} not found" unless find(:xpath, xpath).click + begin + find(:xpath, xpath).click + rescue Capybara::ElementNotFound + raise "xpath: #{xpath} not found" if if_present.empty? + end end When(/^I select the addon "(.*?)"$/) do |addon| @@ -152,9 +156,9 @@ raise 'xpath: button#addProducts not found' unless find('button#addProducts').click end -Then(/^the SLE15 (SP3|SP4) product should be added$/) do |sp_version| +Then(/^the SLE15 (SP3|SP4|SP5) product should be added$/) do |sp_version| output, _code = get_target('server').run('echo -e "admin\nadmin\n" | mgr-sync list channels', check_errors: false, buffer_size: 1_000_000) - STDOUT.puts "Products list:\n#{output}" + log "Products list:\n#{output}" match = "[I] SLE-Product-SLES15-#{sp_version}-Pool for x86_64 SUSE Linux Enterprise Server 15 #{sp_version} x86_64 [sle-product-sles15-#{sp_version.downcase}-pool-x86_64]" raise "Not included:\n #{match}" unless output.include? match match = "[I] SLE-Module-Basesystem15-#{sp_version}-Updates for x86_64 Basesystem Module 15 #{sp_version} x86_64 [sle-module-basesystem15-#{sp_version.downcase}-updates-x86_64]" diff --git a/testsuite/features/support/commonlib.rb b/testsuite/features/support/commonlib.rb index 459c674d6047..06a6a6b87fa5 100644 --- a/testsuite/features/support/commonlib.rb +++ b/testsuite/features/support/commonlib.rb @@ -19,30 +19,6 @@ def generate_temp_file(name, content) end end -# If we for example -# - start a reposync in reposync/srv_sync_channels.feature -# - then kill it in reposync/srv_wait_for_reposync.feature -# - then restart it later on in init_clients/sle_minion.feature -# then the channel will be in an inconsistent state. -# -# This function computes a list of reposyncs to avoid killing, because they might be involved in bootstrapping. -# -# This is a safety net only, the best thing to do is to not start the reposync at all. -def compute_channels_to_leave_running - # keep the repos needed for the auto-installation tests - do_not_kill = CHANNEL_TO_SYNCH_BY_OS_VERSION['default'] - [get_target('sle_minion'), get_target('build_host'), get_target('ssh_minion'), get_target('rhlike_minion')].each do |node| - next unless node - os_version = node.os_version - os_family = node.os_family - next unless ['sles', 'rocky'].include?(os_family) - os_version = os_version.split('.')[0] if os_family == 'rocky' - log 'Can\'t build list of reposyncs to leave running' unless %w[15-SP3 15-SP4 8].include? os_version - do_not_kill += CHANNEL_TO_SYNCH_BY_OS_VERSION[os_version] - end - do_not_kill.uniq -end - def count_table_items # count table items using the table counter component items_label_xpath = '//span[contains(text(), \'Items \')]' @@ -51,10 +27,17 @@ def count_table_items end def product + return $product unless $product.nil? _product_raw, code = get_target('server').run('rpm -q patterns-uyuni_server', check_errors: false) - return 'Uyuni' if code.zero? + if code.zero? + $product = 'Uyuni' + return 'Uyuni' + end _product_raw, code = get_target('server').run('rpm -q patterns-suma_server', check_errors: false) - return 'SUSE Manager' if code.zero? + if code.zero? + $product = 'SUSE Manager' + return 'SUSE Manager' + end raise 'Could not determine product' end @@ -95,7 +78,7 @@ def get_reverse_net(net) # report_result is set to true # # Implementation works around https://bugs.ruby-lang.org/issues/15886 -def repeat_until_timeout(timeout: DEFAULT_TIMEOUT, retries: nil, message: nil, report_result: false) +def repeat_until_timeout(timeout: DEFAULT_TIMEOUT, retries: nil, message: nil, report_result: false, dont_raise: false) last_result = nil Timeout.timeout(timeout) do # HACK: Timeout.timeout might not raise Timeout::Error depending on the yielded code block @@ -117,7 +100,10 @@ def repeat_until_timeout(timeout: DEFAULT_TIMEOUT, retries: nil, message: nil, r raise "Timeout after #{timeout} seconds (repeat_until_timeout)#{detail}" end rescue Timeout::Error - raise "Timeout after #{timeout} seconds (Timeout.timeout)#{format_detail(message, last_result, report_result)}" + STDOUT.puts "Timeout after #{timeout} seconds (Timeout.timeout)#{format_detail(message, last_result, report_result)}" + raise unless dont_raise +rescue StandardError + raise unless dont_raise end def check_text_and_catch_request_timeout_popup?(text1, text2: nil, timeout: Capybara.default_max_wait_time) @@ -450,3 +436,29 @@ def update_ca(node) certutil -d sql:/root/.pki/nssdb -A -t TC -n "susemanager" -i /etc/pki/trust/anchors/#{server_name}.cert` end end + +# This functions checks if the channel has been synced +def channel_is_synced(channel) + # solv is the last file to be written when the server synchronizes a channel, therefore we wait until it exist + result, code = get_target('server').run("dumpsolv /var/cache/rhn/repodata/#{channel}/solv", verbose: true, check_errors: false) + if code.zero? && !result.include?('repo size: 0') + STDOUT.puts "Channel #{channel} is synced." + # We want to check if no .new files exists. On a re-sync, the old files stay, the new one have this suffix until it's ready. + _result, new_code = get_target('server').run("dumpsolv /var/cache/rhn/repodata/#{channel}/solv.new", verbose: true, check_errors: false) + # Channel synced if no .new files exist + !new_code.zero? + else + # If the solv file doesn't exist, we check if we are under a Debian-like repository + command = "test -s /var/cache/rhn/repodata/#{channel}/Release && test -s /var/cache/rhn/repodata/#{channel}/Packages" + _result, new_code = get_target('server').run(command, verbose: true, check_errors: false) + # Channel synced if Release and Packages files exist + new_code.zero? + end +end + +# This function deletes the client tools channels from a different product +def sanitize_client_tools(channels) + channels.delete_if { |channel| channel.include? 'manager-tools' } if product == 'Uyuni' + channels.delete_if { |channel| channel.include? 'uyuni-client' } if product == 'SUSE Manager' + channels +end diff --git a/testsuite/features/support/constants.rb b/testsuite/features/support/constants.rb index e643af15db56..f11d7057b4b0 100644 --- a/testsuite/features/support/constants.rb +++ b/testsuite/features/support/constants.rb @@ -195,16 +195,6 @@ # The values can be found under Software -> Channel List -> Create Channel # Then have a look at Parent Channel and find the desired name -# For containers we do not have SCC, so we set the Fake Base Channel -# for sle_minion -sle_base_channel = - if ENV['PROVIDER'].include? 'podman' - 'Fake Base Channel' - elsif ENV['SERVER'].include?('uyuni') || ENV['SERVER'].include?('suma-pr') || $is_container_server - 'openSUSE Leap 15.5 (x86_64)' - else - 'SLES15-SP4-Pool' - end # Names of our base/parent channels # The keys are the Twopence targets # The values can be found in the webUI under Software -> Manage -> Channels -> Create Channel @@ -212,10 +202,12 @@ BASE_CHANNEL_BY_CLIENT = { 'SUSE Manager' => { 'proxy' => 'SLE-Product-SUSE-Manager-Proxy-4.3-Pool', - 'sle_minion' => sle_base_channel, + 'sle_minion' => 'SLES15-SP4-Pool', 'ssh_minion' => 'SLES15-SP4-Pool', 'rhlike_minion' => 'RHEL8-Pool for x86_64', 'deblike_minion' => 'ubuntu-2004-amd64-main', + 'pxeboot_minion' => 'SLES15-SP4-Pool', + 'buildhost' => 'SLES15-SP4-Pool', 'sle12sp4_minion' => 'SLES12-SP4-Pool', 'sle12sp4_ssh_minion' => 'SLES12-SP4-Pool', 'sle12sp5_minion' => 'SLES12-SP5-Pool', @@ -275,10 +267,12 @@ 'Uyuni' => { 'proxy' => 'openSUSE Leap 15.5 (x86_64)', - 'sle_minion' => sle_base_channel, + 'sle_minion' => 'openSUSE Leap 15.5 (x86_64)', 'ssh_minion' => 'SLES15-SP4-Pool', 'rhlike_minion' => 'RHEL8-Pool for x86_64', 'deblike_minion' => 'ubuntu-2004-amd64-main', + 'pxeboot_minion' => 'SLES15-SP4-Pool', + 'buildhost' => 'SLES15-SP4-Pool', 'sle12sp4_minion' => 'SLES12-SP4-Pool', 'sle12sp4_ssh_minion' => 'SLES12-SP4-Pool', 'sle12sp5_minion' => 'SLES12-SP5-Pool', @@ -334,7 +328,14 @@ 'opensuse154arm_ssh_minion' => 'openSUSE Leap 15.4 (aarch64)', 'opensuse155arm_minion' => 'openSUSE Leap 15.5 (aarch64)', 'opensuse155arm_ssh_minion' => 'openSUSE Leap 15.5 (aarch64)' - } }.freeze + }, + 'Fake' => + { + 'sle_minion' => 'Fake-Base-Channel', + 'pxeboot_minion' => 'Fake-Base-Channel', + 'proxy' => 'Fake-Base-Channel', + 'buildhost' => 'Fake-Base-Channel' + } }.freeze # Used for creating activation keys # The keys are the values of BASE_CHANNEL_BY_CLIENT @@ -357,7 +358,7 @@ 'SLE-Micro-5.3-Pool for x86_64' => 'sle-micro-5.3-pool-x86_64', 'SLE-Micro-5.4-Pool for x86_64' => 'sle-micro-5.4-pool-x86_64', 'almalinux9 for x86_64' => 'no-appstream-alma-9-result-almalinux9-x86_64', - 'Fake Base Channel' => 'fake_base_channel', + 'Fake-Base-Channel' => 'fake-base-channel', 'RHEL x86_64 Server 7' => 'rhel-x86_64-server-7', 'EL9-Pool for x86_64' => 'no-appstream-liberty-9-result-el9-pool-x86_64', 'oraclelinux9 for x86_64' => 'no-appstream-oracle-9-result-oraclelinux9-x86_64', @@ -387,7 +388,7 @@ 'SLE-Micro-5.3-Pool for x86_64' => 'sle-micro-5.3-pool-x86_64', 'SLE-Micro-5.4-Pool for x86_64' => 'sle-micro-5.4-pool-x86_64', 'AlmaLinux 9 (x86_64)' => 'no-appstream-alma-9-result-almalinux9-x86_64', - 'Fake Base Channel' => 'fake_base_channel', + 'Fake-Base-Channel' => 'fake-base-channel', 'CentOS 7 (x86_64)' => 'centos7-x86_64', 'EL9-Pool for x86_64' => 'no-appstream-liberty-9-result-el9-pool-x86_64', 'Oracle Linux 9 (x86_64)' => 'no-appstream-oracle-9-result-oraclelinux9-x86_64', @@ -421,7 +422,7 @@ 'SLE-Micro-5.3-Pool for x86_64' => 'SLE-MICRO-5.3-x86_64', 'SLE-Micro-5.4-Pool for x86_64' => 'SLE-MICRO-5.4-x86_64', 'almalinux9 for x86_64' => 'almalinux-9-x86_64', - 'Fake Base Channel' => 'fake_base_channel-x86_64', + 'Fake-Base-Channel' => 'fake-base-channel-x86_64', 'RHEL x86_64 Server 7' => 'RES7-x86_64', 'EL9-Pool for x86_64' => 'SUSE-LibertyLinux9-x86_64', 'oraclelinux9 for x86_64' => 'oracle-9-x86_64', @@ -451,7 +452,7 @@ 'SLE-Micro-5.3-Pool for x86_64' => 'SLE-MICRO-5.3-x86_64', 'SLE-Micro-5.4-Pool for x86_64' => 'SLE-MICRO-5.4-x86_64', 'AlmaLinux 9 (x86_64)' => 'almalinux-9-x86_64-uyuni', - 'Fake Base Channel' => 'fake_base_channel-x86_64', + 'Fake-Base-Channel' => 'fake-base-channel-x86_64', 'CentOS 7 (x86_64)' => 'centos-7-x86_64-uyuni', 'EL9-Pool for x86_64' => 'SUSE-LibertyLinux9-x86_64', 'Oracle Linux 9 (x86_64)' => 'oracle-9-x86_64-uyuni', @@ -487,7 +488,7 @@ 'SLE-Micro-5.3-Pool for x86_64' => 'sle-micro-5.3-pool-x86_64', 'SLE-Micro-5.4-Pool for x86_64' => 'sle-micro-5.4-pool-x86_64', 'almalinux9 for x86_64' => nil, - 'Fake Base Channel' => nil, + 'Fake-Base-Channel' => nil, 'RHEL x86_64 Server 7' => 'rhel-x86_64-server-7', 'EL9-Pool for x86_64' => 'el9-pool-x86_64', 'oraclelinux9 for x86_64' => nil, @@ -517,7 +518,7 @@ 'SLE-Micro-5.3-Pool for x86_64' => 'sle-micro-5.3-pool-x86_64', 'SLE-Micro-5.4-Pool for x86_64' => 'sle-micro-5.4-pool-x86_64', 'almalinux9 for x86_64' => nil, - 'Fake Base Channel' => nil, + 'Fake-Base-Channel' => nil, 'RHEL x86_64 Server 7' => 'centos-7-x86_64-uyuni', 'EL9-Pool for x86_64' => 'el9-pool-x86_64', 'oraclelinux9 for x86_64' => nil, @@ -589,178 +590,332 @@ 'opensuse155arm_minion' => 'aarch64', 'opensuse155arm_ssh_minion' => 'aarch64' }.freeze -CHANNEL_TO_SYNCH_BY_OS_VERSION = { - # 'default' is required for auto-installation tests. +CHANNEL_TO_SYNCH_BY_OS_PRODUCT_VERSION = { + # WARNING: + # - beta channels were removed because they are not selected and not currently synced, add them again when we will use them + # - sled channels for SUMA tools were removed as we are not currently synchronizing them + # - 'default' is required for auto-installation tests. 'default' => - %w[ - sle-product-sles15-sp4-pool-x86_64 - sle-manager-tools15-pool-x86_64-sp4 - sle-manager-tools15-pool-x86_64-sled-sp4 - sle-manager-tools15-beta-pool-x86_64-sp4 - sle-module-containers15-sp4-pool-x86_64 - sle-module-basesystem15-sp4-pool-x86_64 - sle-module-server-applications15-sp4-pool-x86_64 - sle-product-sles15-sp4-updates-x86_64 - sle-manager-tools15-updates-x86_64-sp4 - sle-manager-tools15-updates-x86_64-sled-sp4 - sle-manager-tools15-beta-updates-x86_64-sp4 - sle-module-containers15-sp4-updates-x86_64 - sle-module-basesystem15-sp4-updates-x86_64 - sle-module-server-applications15-sp4-updates-x86_64 - sle15-sp4-installer-updates-x86_64 - sle-module-desktop-applications15-sp4-pool-x86_64 - sle-module-desktop-applications15-sp4-updates-x86_64 - sle-module-devtools15-sp4-pool-x86_64 - sle-module-devtools15-sp4-updates-x86_64 - sle-module-containers15-sp4-pool-x86_64 - sle-module-containers15-sp4-updates-x86_64 - ], - '15-SP3' => - %w[ - sle-product-sles15-sp3-pool-x86_64 - sle-manager-tools15-pool-x86_64-sp3 - sle-manager-tools15-pool-x86_64-sled-sp3 - sle-manager-tools15-beta-pool-x86_64-sp3 - sle-module-containers15-sp3-pool-x86_64 - sle-module-basesystem15-sp3-pool-x86_64 - sle-module-server-applications15-sp3-pool-x86_64 - sle-product-sles15-sp3-updates-x86_64 - sle-manager-tools15-updates-x86_64-sp3 - sle-manager-tools15-updates-x86_64-sled-sp3 - sle-manager-tools15-beta-updates-x86_64-sp3 - sle-module-containers15-sp3-updates-x86_64 - sle-module-basesystem15-sp3-updates-x86_64 - sle-module-server-applications15-sp3-updates-x86_64 - sle15-sp3-installer-updates-x86_64 - sle-module-desktop-applications15-sp3-pool-x86_64 - sle-module-desktop-applications15-sp3-updates-x86_64 - sle-module-devtools15-sp3-pool-x86_64 - sle-module-devtools15-sp3-updates-x86_64 - sle-module-containers15-sp3-pool-x86_64 - sle-module-containers15-sp3-updates-x86_64 - ], - '15-SP4' => - %w[ - sle-product-sles15-sp4-pool-x86_64 - sle-manager-tools15-pool-x86_64-sp4 - sle-manager-tools15-pool-x86_64-sled-sp4 - sle-manager-tools15-beta-pool-x86_64-sp4 - sle-module-containers15-sp4-pool-x86_64 - sle-module-basesystem15-sp4-pool-x86_64 - sle-module-server-applications15-sp4-pool-x86_64 - sle-product-sles15-sp4-updates-x86_64 - sle-manager-tools15-updates-x86_64-sp4 - sle-manager-tools15-updates-x86_64-sled-sp4 - sle-manager-tools15-beta-updates-x86_64-sp4 - sle-module-containers15-sp4-updates-x86_64 - sle-module-basesystem15-sp4-updates-x86_64 - sle-module-server-applications15-sp4-updates-x86_64 - sle15-sp4-installer-updates-x86_64 - sle-module-desktop-applications15-sp4-pool-x86_64 - sle-module-desktop-applications15-sp4-updates-x86_64 - sle-module-devtools15-sp4-pool-x86_64 - sle-module-devtools15-sp4-updates-x86_64 - sle-module-containers15-sp4-pool-x86_64 - sle-module-containers15-sp4-updates-x86_64 - sle-module-suse-manager-proxy-4.3-pool-x86_64 - sle-module-suse-manager-proxy-4.3-updates-x86_64 - sle-module-server-applications15-sp4-pool-x86_64-proxy-4.3 - sle-module-server-applications15-sp4-updates-x86_64-proxy-4.3 - sle-module-basesystem15-sp4-pool-x86_64-proxy-4.3 - sle-module-basesystem15-sp4-updates-x86_64-proxy-4.3 - sle-product-suse-manager-proxy-4.3-pool-x86_64 - sle-product-suse-manager-proxy-4.3-updates-x86_64 - sle-product-suse-manager-retail-branch-server-4.3-pool-x86_64 - sle-product-suse-manager-retail-branch-server-4.3-updates-x86_64 - sle-module-suse-manager-retail-branch-server-4.3-pool-x86_64 - sle-module-suse-manager-retail-branch-server-4.3-updates-x86_64 - sle-module-basesystem15-sp4-pool-x86_64-smrbs-4.3 - sle-module-basesystem15-sp4-updates-x86_64-smrbs-4.3 - sle-module-suse-manager-proxy-4.3-pool-x86_64-smrbs - sle-module-suse-manager-proxy-4.3-updates-x86_64-smrbs - sle-module-server-applications15-sp4-updates-x86_64-smrbs-4.3 - ], - '8' => - %w[ - res8-manager-tools-pool-x86_64 - res8-manager-tools-updates-x86_64 - ], - '15.4' => - %w[ - opensuse_leap15_4-x86_64 - opensuse_leap15_4-x86_64-non-oss - opensuse_leap15_4-x86_64-non-oss-updates - opensuse_leap15_4-x86_64-updates - opensuse_leap15_4-x86_64-backports-updates - opensuse_leap15_4-x86_64-sle-updates - uyuni-proxy-devel-leap-x86_64 - opensuse_leap15_4-uyuni-client-x86_64 - ], - '15.5' => - %w[ - opensuse_leap15_5-x86_64 - opensuse_leap15_5-x86_64-non-oss - opensuse_leap15_5-x86_64-non-oss-updates - opensuse_leap15_5-x86_64-updates - opensuse_leap15_5-x86_64-backports-updates - opensuse_leap15_5-x86_64-sle-updates - uyuni-proxy-devel-leap-x86_64 - opensuse_leap15_5-uyuni-client-x86_64 - ] -}.freeze - -OS_REPOS_BY_OS_VERSION = { - '11-SP4' => - %w[ - SLE-Module-Basesystem11-SP4-Pool - SLE-Module-Basesystem11-SP4-Updates - SLE-Module-Containers11-SP4-Pool - SLE-Module-Containers11-SP4-Updates - ], - '12-SP3' => - %w[ - SLE-Module-Basesystem12-SP3-Pool - SLE-Module-Basesystem12-SP3-Updates - ], - '12-SP4' => - %w[ - SLE-Module-Basesystem12-SP4-Pool - SLE-Module-Basesystem12-SP4-Updates - ], - '15-SP1' => - %w[ - SLE-Module-Basesystem15-SP1-Pool - SLE-Module-Basesystem15-SP1-Updates - SLE-Module-DevTools15-SP1-Pool - SLE-Module-DevTools15-SP1-Updates - SLE-Module-Desktop-Applications15-SP1-Pool - SLE-Module-Desktop-Applications15-SP1-Updates - ], - '15-SP2' => - %w[ - SLE-Module-Basesystem15-SP2-Pool - SLE-Module-Basesystem15-SP2-Updates - SLE-Module-DevTools15-SP2-Pool - SLE-Module-DevTools15-SP2-Updates - SLE-Module-Desktop-Applications15-SP2-Pool - SLE-Module-Desktop-Applications15-SP2-Updates - ], - '15-SP3' => - %w[ - SLE-Module-Basesystem15-SP3-Pool - SLE-Module-Basesystem15-SP3-Updates - SLE-Module-DevTools15-SP3-Pool - SLE-Module-DevTools15-SP3-Updates - SLE-Module-Desktop-Applications15-SP3-Pool - SLE-Module-Desktop-Applications15-SP3-Updates - ], - '15-SP4' => - %w[ - SLE-Module-Basesystem15-SP4-Pool - SLE-Module-Basesystem15-SP4-Updates - SLE-Module-DevTools15-SP4-Pool - SLE-Module-DevTools15-SP4-Updates - SLE-Module-Desktop-Applications15-SP4-Pool - SLE-Module-Desktop-Applications15-SP4-Updates - ] + %w[ + sle-product-sles15-sp4-pool-x86_64 + sle-manager-tools15-pool-x86_64-sp4 + sle-module-containers15-sp4-pool-x86_64 + sle-module-basesystem15-sp4-pool-x86_64 + sle-module-server-applications15-sp4-pool-x86_64 + sle-product-sles15-sp4-updates-x86_64 + sle-manager-tools15-updates-x86_64-sp4 + sle-module-containers15-sp4-updates-x86_64 + sle-module-basesystem15-sp4-updates-x86_64 + sle-module-server-applications15-sp4-updates-x86_64 + sle15-sp4-installer-updates-x86_64 + sle-module-desktop-applications15-sp4-pool-x86_64 + sle-module-desktop-applications15-sp4-updates-x86_64 + sle-module-devtools15-sp4-pool-x86_64 + sle-module-devtools15-sp4-updates-x86_64 + sle-module-containers15-sp4-pool-x86_64 + sle-module-containers15-sp4-updates-x86_64 + ], + 'almalinux9' => + %w[ + almalinux9-appstream-x86_64 + almalinux9-x86_64 + almalinux9-uyuni-client-x86_64 + ], + 'debian-10' => + %w[ + debian-10-main-security-amd64 + debian-10-main-updates-amd64 + debian-10-pool-amd64 + debian-10-suse-manager-tools-amd64 + devel-debian-10-client-tools + debian-10-amd64-uyuni-client + ], + 'debian-11' => + %w[ + debian-11-main-security-amd64 + debian-11-main-updates-amd64 + debian-11-pool-amd64 + debian-11-suse-manager-tools-amd64 + devel-debian-11-client-tools + debian-11-amd64-uyuni-client + ], + 'sll-9' => + %w[ + sll-9-updates-x86_64 + sll-as-9-updates-x86_64 + sll-cb-9-updates-x86_64 + ], + 'el9' => + %w[ + el9-manager-tools-pool-x86_64-alma + el9-manager-tools-pool-x86_64 + el9-manager-tools-pool-x86_64-ol9 + el9-manager-tools-pool-x86_64-rocky + el9-manager-tools-updates-x86_64-alma + el9-manager-tools-updates-x86_64 + el9-manager-tools-updates-x86_64-ol9 + el9-manager-tools-updates-x86_64-rocky + el9-pool-x86_64 + ], + 'rockylinux-8' => + %w[ + rockylinux-8-appstream-x86_64 + rockylinux-8-x86_64 + rockylinux8-uyuni-client-x86_64 + ], + 'rockylinux-9' => + %w[ + rockylinux-9-appstream-x86_64 + rockylinux-9-x86_64 + rockylinux9-uyuni-client-x86_64 + ], + 'oraclelinux9' => + %w[ + oraclelinux9-appstream-x86_64 + oraclelinux9-x86_64 + oraclelinux9-uyuni-client-x86_64 + ], + 'sles12-sp4' => + %w[ + sles12-sp4-installer-updates-x86_64 + sles12-sp4-ltss-updates-x86_64 + sles12-sp4-pool-x86_64 + sles12-sp4-updates-x86_64 + sle-manager-tools12-updates-x86_64-sp4 + sle-manager-tools12-pool-x86_64-sp4 + sles12-sp4-uyuni-client-x86_64 + ], + 'sles12-sp5' => + %w[ + sles12-sp5-installer-updates-x86_64 + sles12-sp5-pool-x86_64 + sles12-sp5-updates-x86_64 + sle-manager-tools12-updates-x86_64-sp5 + sle-manager-tools12-pool-x86_64-sp5 + sles12-sp5-uyuni-client-x86_64 + ], + 'sles15-sp1' => + %w[ + sle-product-sles15-sp1-ltss-updates-x86_64 + sle-product-sles15-sp1-pool-x86_64 + sle-product-sles15-sp1-updates-x86_64 + sle-module-server-applications15-sp1-pool-x86_64 + sle-module-server-applications15-sp1-updates-x86_64 + sle-module-basesystem15-sp1-pool-x86_64 + sle-module-basesystem15-sp1-updates-x86_64 + sle-manager-tools15-updates-x86_64-sp1 + sle-manager-tools15-pool-x86_64-sp1 + sle15-sp1-installer-updates-x86_64 + sles15-sp1-uyuni-client-x86_64 + ], + 'sles15-sp2' => + %w[ + sle-product-sles15-sp2-ltss-updates-x86_64 + sle-product-sles15-sp2-pool-x86_64 + sle-product-sles15-sp2-updates-x86_64 + sle-module-server-applications15-sp2-pool-x86_64 + sle-module-server-applications15-sp2-updates-x86_64 + sle-module-devtools15-sp2-pool-x86_64 + sle-module-devtools15-sp2-updates-x86_64 + sle-module-desktop-applications15-sp2-pool-x86_64 + sle-module-desktop-applications15-sp2-updates-x86_64 + sle-module-basesystem15-sp2-pool-x86_64 + sle-module-basesystem15-sp2-updates-x86_64 + sle-manager-tools15-updates-x86_64-sp2 + sle-manager-tools15-pool-x86_64-sp2 + sle15-sp2-installer-updates-x86_64 + sles15-sp2-uyuni-client-x86_64 + ], + 'sles15-sp3' => + %w[ + sle-product-sles15-sp3-ltss-updates-x86_64 + sle-product-sles15-sp3-pool-x86_64 + sle-manager-tools15-pool-x86_64-sp3 + sle-module-containers15-sp3-pool-x86_64 + sle-module-basesystem15-sp3-pool-x86_64 + sle-module-server-applications15-sp3-pool-x86_64 + sle-product-sles15-sp3-updates-x86_64 + sle-manager-tools15-updates-x86_64-sp3 + sle-module-containers15-sp3-updates-x86_64 + sle-module-basesystem15-sp3-updates-x86_64 + sle-module-server-applications15-sp3-updates-x86_64 + sle15-sp3-installer-updates-x86_64 + sle-module-desktop-applications15-sp3-pool-x86_64 + sle-module-desktop-applications15-sp3-updates-x86_64 + sle-module-devtools15-sp3-pool-x86_64 + sle-module-devtools15-sp3-updates-x86_64 + sle-module-containers15-sp3-pool-x86_64 + sle-module-containers15-sp3-updates-x86_64 + sles15-sp3-uyuni-client-x86_64 + ], + 'sles15-sp4' => + %w[ + sle15-sp4-installer-updates-x86_64 + sle-manager-tools15-pool-x86_64-sp4 + sle-manager-tools15-updates-x86_64-sp4 + sle-module-basesystem15-sp4-pool-x86_64 + sle-module-basesystem15-sp4-updates-x86_64 + sle-module-containers15-sp4-pool-x86_64 + sle-module-containers15-sp4-updates-x86_64 + sle-module-desktop-applications15-sp4-pool-x86_64 + sle-module-desktop-applications15-sp4-updates-x86_64 + sle-module-devtools15-sp4-pool-x86_64 + sle-module-devtools15-sp4-updates-x86_64 + sle-module-server-applications15-sp4-pool-x86_64 + sle-module-server-applications15-sp4-updates-x86_64 + sle-product-sles15-sp4-pool-x86_64 + sle-product-sles15-sp4-updates-x86_64 + sles15-sp4-uyuni-client-x86_64 + ], + 'sles15-sp5' => + %w[ + sle15-sp5-installer-updates-x86_64 + sle-manager-tools15-pool-x86_64-sp5 + sle-manager-tools15-updates-x86_64-sp5 + sle-module-basesystem15-sp5-pool-x86_64 + sle-module-basesystem15-sp5-updates-x86_64 + sle-module-containers15-sp5-pool-x86_64 + sle-module-containers15-sp5-updates-x86_64 + sle-module-desktop-applications15-sp5-pool-x86_64 + sle-module-desktop-applications15-sp5-updates-x86_64 + sle-module-devtools15-sp5-pool-x86_64 + sle-module-devtools15-sp5-updates-x86_64 + sle-module-server-applications15-sp5-pool-x86_64 + sle-module-server-applications15-sp5-updates-x86_64 + sle-product-sles15-sp5-pool-x86_64 + sle-product-sles15-sp5-updates-x86_64 + sles15-sp5-uyuni-client-x86_64 + ], + 'res7' => + %w[ + rhel-x86_64-server-7 + res7-suse-manager-tools-x86_64 + res7-x86_64 + ], + 'res8' => + %w[ + rhel8-pool-x86_64 + res-8-updates-x86_64 + res-as-8-updates-x86_64 + res-cb-8-updates-x86_64 + res8-manager-tools-pool-x86_64 + res8-manager-tools-updates-x86_64 + sll8-uyuni-client-x86_64 + ], + 'leap15.5-x86_64' => + %w[ + opensuse_leap15_5-x86_64 + opensuse_leap15_5-x86_64-non-oss + opensuse_leap15_5-x86_64-non-oss-updates + opensuse_leap15_5-x86_64-updates + opensuse_leap15_5-x86_64-backports-updates + opensuse_leap15_5-x86_64-sle-updates + opensuse_leap15_5-uyuni-client-x86_64 + ], + 'leap15.4-aarch64' => + %w[ + opensuse-backports-15.4-updates-aarch64 + opensuse-leap-15.4-pool-aarch64 + opensuse-leap-15.4-updates-aarch64 + sle-manager-tools15-updates-aarch64-opensuse-15.4 + sle-manager-tools15-pool-aarch64-opensuse-15.4 + ], + 'leap15.5-aarch64' => + %w[ + opensuse-backports-15.5-updates-aarch64 + opensuse-leap-15.5-pool-aarch64 + opensuse-leap-15.5-updates-aarch64 + opensuse-sle-15.5-updates-aarch64 + sle-manager-tools15-updates-aarch64-opensuse-15.5 + sle-manager-tools15-pool-aarch64-opensuse-15.5 + ], + 'suse-microos-5.1' => + %w[ + suse-microos-5.1-pool-x86_64 + suse-microos-5.1-updates-x86_64 + sle-manager-tools-for-micro5-updates-x86_64-5.1 + sle-manager-tools-for-micro5-pool-x86_64-5.1 + sle-micro-5.1-uyuni-client-x86_64 + ], + 'suse-microos-5.2' => + %w[ + suse-microos-5.2-pool-x86_64 + suse-microos-5.2-updates-x86_64 + sle-manager-tools-for-micro5-updates-x86_64-5.2 + sle-manager-tools-for-micro5-pool-x86_64-5.2 + suse-microos-5.2-uyuni-client-x86_64 + ], + 'sle-micro-5.3' => + %w[ + sle-micro-5.3-pool-x86_64 + sle-micro-5.3-updates-x86_64 + sle-manager-tools-for-micro5-updates-x86_64-5.3 + sle-manager-tools-for-micro5-pool-x86_64-5.3 + suse-microos-5.3-uyuni-client-x86_64 + ], + 'sle-micro-5.4' => + %w[ + sle-micro-5.4-pool-x86_64 + sle-micro-5.4-updates-x86_64 + sle-manager-tools-for-micro5-updates-x86_64-5.4 + sle-manager-tools-for-micro5-pool-x86_64-5.4 + sle-micro-5.4-uyuni-client-x86_64 + ], + 'ubuntu-2004' => + %w[ + ubuntu-2004-amd64-main-amd64 + ubuntu-2004-amd64-main-security-amd64 + ubuntu-2004-amd64-main-updates-amd64 + ubuntu-20.04-suse-manager-tools-amd64 + ], + 'ubuntu-2204' => + %w[ + ubuntu-2204-amd64-main-amd64 + ubuntu-2204-amd64-main-security-amd64 + ubuntu-2204-amd64-main-updates-amd64 + ubuntu-22.04-suse-manager-tools-amd64 + ], + 'fake' => + %w[ + fake-base-channel + fake_child_channel + fake-base-channel-i586 + fake-child-channel-i586 + test-base-channel-x86_64 + test-child-channel-x86_64 + fake-base-channel-debian-like + fake-base-channel-rh-like + ], + 'suma-proxy-43' => + %w[ + sle-product-suse-manager-proxy-4.3-pool-x86_64 + sle-product-suse-manager-proxy-4.3-updates-x86_64 + sle-module-suse-manager-proxy-4.3-pool-x86_64 + sle-module-suse-manager-proxy-4.3-updates-x86_64 + ], + 'suma-retail-branch-server-43' => + %w[ + sle-product-suse-manager-retail-branch-server-4.3-pool-x86_64 + sle-product-suse-manager-retail-branch-server-4.3-updates-x86_64 + sle-module-suse-manager-retail-branch-server-4.3-pool-x86_64 + sle-module-suse-manager-retail-branch-server-4.3-updates-x86_64 + ], + 'uyuni-proxy' => + %w[ + opensuse_leap15_4 + opensuse_leap15_4-non-oss + opensuse_leap15_4-non-oss-updates + opensuse_leap15_4-updates + opensuse_leap15_4-backports-updates + opensuse_leap15_4-sle-updates + uyuni-proxy-devel-leap-x86_64 + opensuse_leap15_4-uyuni-client-devel + ], + 'uyuni-retail-branch-server' => + %w[ + sle-product-suse-manager-retail-branch-server-4.3-pool-x86_64 + sle-product-suse-manager-retail-branch-server-4.3-updates-x86_64 + sle-module-suse-manager-retail-branch-server-4.3-pool-x86_64 + sle-module-suse-manager-retail-branch-server-4.3-updates-x86_64 + ] }.freeze diff --git a/testsuite/features/support/env.rb b/testsuite/features/support/env.rb index fff9d1b04eea..d1f3e7761b19 100644 --- a/testsuite/features/support/env.rb +++ b/testsuite/features/support/env.rb @@ -72,36 +72,39 @@ MultiTest.disable_autorun # register chromedriver headless mode -Capybara.register_driver(:headless_chrome) do |app| - client = Selenium::WebDriver::Remote::Http::Default.new - # WORKAROUND failure at Scenario: Test IPMI functions: increase from 60 s to 180 s - client.read_timeout = 180 - # Chrome driver options - chrome_options = %w[no-sandbox disable-dev-shm-usage ignore-certificate-errors disable-gpu window-size=2048,2048, js-flags=--max_old_space_size=2048] - chrome_options << 'headless' unless $debug_mode - capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( - chromeOptions: { - args: chrome_options, - w3c: false, - prefs: { - download: { - prompt_for_download: false, - default_directory: '/tmp/downloads' +def capybara_register_driver + Capybara.register_driver(:headless_chrome) do |app| + client = Selenium::WebDriver::Remote::Http::Default.new + # WORKAROUND failure at Scenario: Test IPMI functions: increase from 60 s to 180 s + client.read_timeout = 180 + # Chrome driver options + chrome_options = %w[no-sandbox disable-dev-shm-usage ignore-certificate-errors disable-gpu window-size=2048,2048, js-flags=--max_old_space_size=2048] + chrome_options << 'headless' unless $debug_mode + capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( + chromeOptions: { + args: chrome_options, + w3c: false, + prefs: { + download: { + prompt_for_download: false, + default_directory: '/tmp/downloads' + } } - } - }, - unexpectedAlertBehaviour: 'accept', - unhandledPromptBehavior: 'accept' - ) - - Capybara::Selenium::Driver.new( - app, - browser: :chrome, - desired_capabilities: capabilities, - http_client: client - ) + }, + unexpectedAlertBehaviour: 'accept', + unhandledPromptBehavior: 'accept' + ) + + Capybara::Selenium::Driver.new( + app, + browser: :chrome, + desired_capabilities: capabilities, + http_client: client + ) + end end +capybara_register_driver Selenium::WebDriver.logger.level = :error unless $debug_mode Capybara.default_driver = :headless_chrome Capybara.javascript_driver = :headless_chrome @@ -187,8 +190,7 @@ def process_code_coverage AfterStep do if has_css?('.senna-loading', wait: 0) - log 'WARN: Step ends with an ajax transition not finished, let\'s wait a bit!' - log 'Timeout: Waiting AJAX transition' unless has_no_css?('.senna-loading', wait: 40) + log 'Timeout: Waiting AJAX transition' unless has_no_css?('.senna-loading', wait: 30) end end @@ -198,6 +200,10 @@ def process_code_coverage log "This scenario ran at: #{current_time}\n" end +Before('@skip') do + skip_this_scenario +end + # do some tests only if the corresponding node exists Before('@proxy') do skip_this_scenario unless ENV.key? ENV_VAR_BY_HOST['proxy'] diff --git a/testsuite/features/support/lavanda.rb b/testsuite/features/support/lavanda.rb index 9c371c0c0e63..2a2703434361 100644 --- a/testsuite/features/support/lavanda.rb +++ b/testsuite/features/support/lavanda.rb @@ -192,7 +192,7 @@ def run_local(cmd, separated_results: false, check_errors: true, timeout: DEFAUL def run_until_ok(cmd, timeout: DEFAULT_TIMEOUT) repeat_until_timeout(timeout: timeout, report_result: true) do result, code = run(cmd, check_errors: false) - break if code.zero? + return [result, code] if code.zero? sleep 2 result end @@ -206,7 +206,7 @@ def run_until_ok(cmd, timeout: DEFAULT_TIMEOUT) def run_until_fail(cmd, timeout: DEFAULT_TIMEOUT) repeat_until_timeout(timeout: timeout, report_result: true) do result, code = run(cmd, check_errors: false) - break if code.nonzero? + return [result, code] if code.nonzero? sleep 2 result end @@ -220,7 +220,7 @@ def run_until_fail(cmd, timeout: DEFAULT_TIMEOUT) def wait_while_process_running(process) repeat_until_timeout(report_result: true) do result, code = run("pgrep -x #{process} >/dev/null", check_errors: false) - break if code.nonzero? + return [result, code] if code.nonzero? sleep 2 result end diff --git a/testsuite/run_sets/build_validation/build_validation_wait_for_custom_reposync.yml b/testsuite/run_sets/build_validation/build_validation_wait_for_custom_reposync.yml deleted file mode 100644 index 1e94b2bdbcd7..000000000000 --- a/testsuite/run_sets/build_validation/build_validation_wait_for_custom_reposync.yml +++ /dev/null @@ -1,7 +0,0 @@ -# This file describes the order of features in a Build Validation test suite run. - -## Wait for custom channels synchronization BEGIN ### - -- features/build_validation/add_non_MU_repositories/srv_wait_for_custom_reposync.feature - -## Wait for custom channels synchronization END ### diff --git a/testsuite/run_sets/build_validation/build_validation_wait_for_product_reposync.yml b/testsuite/run_sets/build_validation/build_validation_wait_for_product_reposync.yml index b4abdbd51a26..a295643298fb 100644 --- a/testsuite/run_sets/build_validation/build_validation_wait_for_product_reposync.yml +++ b/testsuite/run_sets/build_validation/build_validation_wait_for_product_reposync.yml @@ -2,7 +2,6 @@ ## Wait for product channels synchronization BEGIN ### -- features/build_validation/reposync/srv_wait_for_product_reposync.feature +- features/build_validation/reposync/srv_disable_scheduled_reposync.feature ## Wait for product channels synchronization END ### - diff --git a/testsuite/run_sets/core.yml b/testsuite/run_sets/core.yml index f2cf12da8911..8c8ccf942659 100644 --- a/testsuite/run_sets/core.yml +++ b/testsuite/run_sets/core.yml @@ -13,8 +13,6 @@ - features/core/srv_disable_local_repos_off.feature - features/core/srv_organization_credentials.feature - features/core/srv_user_preferences.feature -- features/core/srv_channels_add.feature -- features/core/srv_create_activationkey.feature - features/core/srv_osimage.feature - features/core/srv_docker.feature diff --git a/testsuite/run_sets/github_validation/github_validation_core.yml b/testsuite/run_sets/github_validation/github_validation_core.yml index 0adc1c17f235..b39aab44430c 100644 --- a/testsuite/run_sets/github_validation/github_validation_core.yml +++ b/testsuite/run_sets/github_validation/github_validation_core.yml @@ -6,9 +6,9 @@ # initialize Uyuni server - features/github_validation/core/first_settings.feature - features/core/srv_user_preferences.feature -- features/core/srv_channels_add.feature +- features/reposync/srv_create_fake_channels.feature - features/github_validation/core/create_repository.feature -- features/core/srv_create_activationkey.feature +- features/reposync/srv_create_activationkey.feature - features/core/srv_osimage.feature - features/core/srv_docker.feature - features/reposync/srv_sync_fake_channels.feature diff --git a/testsuite/run_sets/github_validation/github_validation_init_clients.yml b/testsuite/run_sets/github_validation/github_validation_init_clients.yml index 169e84f52dcd..05bc1a02920c 100644 --- a/testsuite/run_sets/github_validation/github_validation_init_clients.yml +++ b/testsuite/run_sets/github_validation/github_validation_init_clients.yml @@ -2,8 +2,6 @@ ## Container features BEGIN ### # IMMUTABLE ORDER -- features/init_clients/allcli_update_activationkeys.feature -# - features/init_clients/srv_check_reposync.feature - features/github_validation/init_clients/sle_ssh_minion.feature - features/github_validation/init_clients/sle_minion.feature - features/github_validation/init_clients/min_rhlike_salt.feature diff --git a/testsuite/run_sets/init_clients.yml b/testsuite/run_sets/init_clients.yml index c38a7fd6a1ee..d87050362012 100644 --- a/testsuite/run_sets/init_clients.yml +++ b/testsuite/run_sets/init_clients.yml @@ -6,9 +6,6 @@ ## Core - Initialize clients BEGIN ## -- features/init_clients/allcli_update_activationkeys.feature -- features/init_clients/srv_check_reposync.feature - # Proxy # one of: proxy_register_as_minion_with_script.feature # proxy_register_as_minion_with_gui.feature diff --git a/testsuite/run_sets/reference_reposync.yml b/testsuite/run_sets/reference_reposync.yml index c8a7dcb2b6cb..9386d48f7c77 100644 --- a/testsuite/run_sets/reference_reposync.yml +++ b/testsuite/run_sets/reference_reposync.yml @@ -14,6 +14,6 @@ - features/reposync/reference_srv_check_reposync.feature -#- features/reposync/srv_wait_for_reposync.feature +#- features/reposync/srv_disable_scheduled_reposync.feature ## Channels and Product synchronization features END ### diff --git a/testsuite/run_sets/refhost.yml b/testsuite/run_sets/refhost.yml index 02ee8f32dd25..aac73b1b4daf 100644 --- a/testsuite/run_sets/refhost.yml +++ b/testsuite/run_sets/refhost.yml @@ -11,8 +11,6 @@ # initialize Uyuni server - features/core/allcli_sanity.feature - features/core/srv_first_settings.feature -- features/core/srv_channels_add.feature -- features/reposync/srv_create_repository.feature - features/core/srv_create_activationkey.feature - features/core/srv_docker.feature @@ -26,9 +24,11 @@ - features/reposync/srv_sync_channels.feature - features/reposync/srv_sync_products.feature - features/reposync/srv_enable_sync_products.feature +- features/reposync/srv_create_fake_channels.feature +- features/reposync/srv_create_fake_repositories.feature +- features/reposync/srv_sync_fake_channels.feature # we let the synchronization run - # - features/reposync/srv_wait_for_reposync.feature -- features/reposync/srv_check_reposync.feature + # - features/reposync/srv_disable_scheduled_reposync.feature ## Core features END ### diff --git a/testsuite/run_sets/reposync.yml b/testsuite/run_sets/reposync.yml index 951d37ecd7cc..59bffb764ba6 100644 --- a/testsuite/run_sets/reposync.yml +++ b/testsuite/run_sets/reposync.yml @@ -9,11 +9,14 @@ # IMMUTABLE ORDER # these features sync real channels (last core features) +- features/reposync/srv_disable_scheduled_reposync.feature - features/reposync/srv_sync_channels.feature - features/reposync/srv_sync_products.feature - features/reposync/srv_enable_sync_products.feature -- features/reposync/srv_wait_for_reposync.feature -- features/reposync/srv_create_repository.feature +- features/reposync/srv_create_fake_channels.feature +- features/reposync/srv_create_fake_repositories.feature - features/reposync/srv_sync_fake_channels.feature - +# Activation keys can only be created after products and channels are synced +- features/reposync/srv_create_activationkey.feature +- features/reposync/allcli_update_activationkeys.feature ## Channels and Product synchronization features END ###