diff --git a/.packit.yaml b/.packit.yaml index 8be81143fc..ca93ec96e4 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -91,7 +91,7 @@ jobs: distros: [centos-8-latest] trigger: pull_request identifier: "tier0-centos" - tmt_plan: "tier0/non-destructive|tier0/destructive" + tmt_plan: "tier0/core" # Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions use_internal_tf: True # For some targets we use official AWS marketplace images, those do not support root ssh login as default, @@ -128,7 +128,7 @@ jobs: merge_pr_in_ci: false trigger: pull_request identifier: "tier0-ol7" - tmt_plan: "tier0/non-destructive|tier0/destructive" + tmt_plan: "tier0/core" # Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions use_internal_tf: True # For some targets we use official AWS marketplace images, those do not support root ssh login as default, @@ -171,7 +171,7 @@ jobs: merge_pr_in_ci: false trigger: pull_request identifier: "tier0-ol8" - tmt_plan: "tier0/non-destructive|tier0/destructive" + tmt_plan: "tier0/core" # Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions use_internal_tf: True # For some targets we use official AWS marketplace images, those do not support root ssh login as default, @@ -214,12 +214,12 @@ jobs: merge_pr_in_ci: false trigger: pull_request identifier: "tier0-al88" - tmt_plan: "tier0/non-destructive|tier0/destructive" + tmt_plan: "tier0/core" # Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions use_internal_tf: True # For some targets we use official AWS marketplace images, those do not support root ssh login as default, # therefore we need to pass post-install-script to enable root login on the host - tf_post_install_script: '#!/bin/bash\nsudo sed -i "s/^.*ssh-rsa/ssh-rsa/" /root/.ssh/authorized_keys' + tf_post_install_script: '#!/bin/bash\nsudo sed -i "s/^.*ssh-rsa/ssh-rsa/" /root/.ssh/authorized_keys; rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux' targets: epel-8-x86_64: distros: ["AlmaLinux OS 8.8.20230524 x86_64"] @@ -257,7 +257,7 @@ jobs: merge_pr_in_ci: false trigger: pull_request identifier: "tier0-al8" - tmt_plan: "tier0/non-destructive|tier0/destructive" + tmt_plan: "tier0/core" # Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions use_internal_tf: True # For some targets we use official AWS marketplace images, those do not support root ssh login as default, @@ -300,7 +300,7 @@ jobs: merge_pr_in_ci: false trigger: pull_request identifier: "tier0-rl88" - tmt_plan: "tier0/non-destructive|tier0/destructive" + tmt_plan: "tier0/core" # Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions use_internal_tf: True # For some targets we use official AWS marketplace images, those do not support root ssh login as default, @@ -343,7 +343,7 @@ jobs: merge_pr_in_ci: false trigger: pull_request identifier: "tier0-rl8" - tmt_plan: "tier0/non-destructive|tier0/destructive" + tmt_plan: "tier0/core" # Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions use_internal_tf: True # For some targets we use official AWS marketplace images, those do not support root ssh login as default, diff --git a/plans/stream.fmf b/plans/stream.fmf index 0801c3109c..86fe9532f1 100644 --- a/plans/stream.fmf +++ b/plans/stream.fmf @@ -10,95 +10,116 @@ adjust+: - enabled: true when: distro == stream-8-latest -/non-destructive: - /sanity: - discover+: - filter+: - [ 'tier: 0', 'tag: non-destructive', 'tag: sanity' ] - /others: - discover+: - filter+: - [ 'tier: 0', 'tag: non-destructive', 'tag: -sanity' ] - -/destructive: - discover+: - # List of tests run for every plan/test case. - # tmt-reboot feature is used for rebooting the system using - # the test management framework. - # The main test scenario gets prepended by the "+<" in each case. - test: - - utils/reboot-after-conversion - - checks-after-conversion - - /basic_conversion_methods: - - /activation_key_conversion: - discover+: - test+<: - - conversion-method/activation_key_conversion - - /rhsm_conversion: - discover+: - test+<: - - conversion-method/rhsm_conversion - - /satellite_conversion: - discover+: - test+<: - - conversion-method/satellite_conversion - - /pre_registered_system_conversion: - adjust+: - - environment+: - C2R_TESTS_CHECK_RHSM_UUID_MATCH: 1 - C2R_TESTS_SUBMAN_REMAIN_REGISTERED: 1 - discover+: - test+<: - - conversion-method/pre_registered_system_conversion - - - /custom_repositories_conversion: - environment+: - SUBMGR_DISABLED_SKIP_CHECK_RHSM_CUSTOM_FACTS: 1 - prepare+: - - name: Add custom repositories - how: ansible - playbook: tests/ansible_collections/roles/add-custom-repos/main.yml - discover+: - test+<: - - conversion-method/custom_repos_conversion - # Exclude the rhel_subman check, we don't use RHSM for the conversion - exclude: - - checks-after-conversion/rhel_subman - - - /isolated_system_conversion: - prepare+: - - name: Allow access to Satellite only - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/isolated-system-conversion/prepare_system.py - discover+: - test+<: - - isolated-system-conversion/isolated_system_conversion - # Exclude the rhel_subman check, we don't use RHSM for the conversion - exclude: - - checks-after-conversion/rhel_subman - - - /single_yum_transaction: - /packages_upgraded_after_conversion: +/sanity: + /non-destructive: discover+: - test+<: - - single-yum-transaction/packages_upgraded_after_conversion + filter+: + [ 'tier: 0', 'tag: non-destructive', 'tag: sanity' ] - /observe_errors: - enabled: false + /destructive: discover+: - test+<: - - single-yum-transaction/single_yum_transaction - - /mismatch_errors: - prepare+: - - name: Install multilib packages with dnf - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_multilib_packages.py + # List of tests run for every plan/test case. + # tmt-reboot feature is used for rebooting the system using + # the test management framework. + # The main test scenario gets prepended by the "+<" in each case. + test: + - utils/reboot-after-conversion + - checks-after-conversion + + /basic_conversion_methods: + /activation_key_conversion: + discover+: + test+<: + - conversion-method/activation_key_conversion + /rhsm_conversion: + discover+: + test+<: + - conversion-method/rhsm_conversion + /satellite_conversion: + discover+: + test+<: + - conversion-method/satellite_conversion + /pre_registered_system_conversion: + adjust+: + - environment+: + C2R_TESTS_CHECK_RHSM_UUID_MATCH: 1 + C2R_TESTS_SUBMAN_REMAIN_REGISTERED: 1 + discover+: + test+<: + - conversion-method/pre_registered_system_conversion + /custom_repositories_conversion: + environment+: + SUBMGR_DISABLED_SKIP_CHECK_RHSM_CUSTOM_FACTS: 1 + prepare+: + - name: Add custom repositories + how: ansible + playbook: tests/ansible_collections/roles/add-custom-repos/main.yml + discover+: + test+<: + - conversion-method/custom_repos_conversion + # Exclude the rhel_subman check, we don't use RHSM for the conversion + exclude: + - checks-after-conversion/rhel_subman + /isolated_system_conversion: + prepare+: + - name: Allow access to Satellite only + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/isolated-system-conversion/prepare_system.py + discover+: + test+<: + - isolated-system-conversion/isolated_system_conversion + # Exclude the rhel_subman check, we don't use RHSM for the conversion + exclude: + - checks-after-conversion/rhel_subman + +/core: + /non-destructive: + discover+: + filter+: + [ 'tier: 0', 'tag: non-destructive', 'tag: -sanity' ] + /destructive: + discover+: + # List of tests run for every plan/test case. + # tmt-reboot feature is used for rebooting the system using + # the test management framework. + # The main test scenario gets prepended by the "+<" in each case. + test: + - utils/reboot-after-conversion + - checks-after-conversion + /single_yum_transaction: + /packages_upgraded_after_conversion: + discover+: + test+<: + - single-yum-transaction/packages_upgraded_after_conversion + /observe_errors: + discover+: + test+<: + - single-yum-transaction/single_yum_transaction + /mismatch_errors: + prepare+: + - name: Install multilib packages with dnf + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_multilib_packages.py + /resolve_dependency: + summary+: | + Handle dependency packages + description+: | + This case installs a couple of packages that we know cause dependency + issues during the package replacement, so the intention of this is to + assert that convert2rhel can handle those packages and not fail during the + replacement, especially with the yum transaction. + prepare+: + - name: Install dependency packages + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_dependency_packages.py + /yum_distro_sync: + prepare+: + - name: enable CentOS' extras repo + how: ansible + playbook: tests/integration/tier0/destructive/yum-distro-sync/add-extras-repo/main.yml + - name: Install problematic package + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/yum-distro-sync/install_problematic_package.py + discover+: + test+<: + - yum-distro-sync/yum_distro_sync diff --git a/plans/tier0.fmf b/plans/tier0.fmf index e811a2dc70..0a7cdc7e01 100644 --- a/plans/tier0.fmf +++ b/plans/tier0.fmf @@ -61,139 +61,139 @@ adjust+: discover+: test+<: - conversion-method/pre_registered_system_conversion +/core: + /non-destructive: + discover+: + filter+: + ['tier: 0', 'tag: non-destructive', 'tag: -sanity'] -/non-destructive: - discover+: - filter+: - ['tier: 0', 'tag: non-destructive', 'tag: -sanity'] - -/destructive: - discover+: - # List of tests run for every plan/test case. - # tmt-reboot feature is used for rebooting the system using - # the test management framework. - # The main test scenario gets prepended by the "+<" in each case. - test: - - utils/reboot-after-conversion - - checks-after-conversion - - /basic_conversion_methods: - - /rhsm_eus_conversion: - enabled: false - adjust+: - - enabled: true - when: > - distro == alma-8.8, rocky-8.8 - discover+: - test+<: - - conversion-method/rhsm_eus_account_conversion - - /rhsm_els_conversion: - enabled: false - adjust+: - - enabled: true - when: > - distro == centos-7, oracle-7 - because: The ELS offering is applicable to EL7 only. - discover+: - test+<: - - conversion-method/rhsm_els_conversion - - /custom_repositories_conversion: - environment+: - SUBMGR_DISABLED_SKIP_CHECK_RHSM_CUSTOM_FACTS: 1 - prepare+: - - name: Add custom repositories - how: ansible - playbook: tests/ansible_collections/roles/add-custom-repos/main.yml - discover+: - test+<: - - conversion-method/custom_repos_conversion - # Exclude the rhel_subman check, we don't use RHSM for the conversion - exclude: - - checks-after-conversion/rhel_subman - - - /single_yum_transaction: - /packages_upgraded_after_conversion: - discover+: - test+<: - - single-yum-transaction/packages_upgraded_after_conversion + /destructive: + discover+: + # List of tests run for every plan/test case. + # tmt-reboot feature is used for rebooting the system using + # the test management framework. + # The main test scenario gets prepended by the "+<" in each case. + test: + - utils/reboot-after-conversion + - checks-after-conversion - /observe_errors: - enabled: false - discover+: - test+<: - - single-yum-transaction/single_yum_transaction + /basic_conversion_methods: - /all_errors: + /rhsm_eus_conversion: + enabled: false adjust+: - enabled: true when: > - distro == oracle-7 - prepare+: - - name: Install ntp package and remove one dependency - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_ntp_and_remove_dependency.py - - /excluded_packages: - adjust+: - - enabled: true - when: distro == centos-7 - prepare+: - - name: Remove some packages from the excluded packages config list - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/remove_excld_pkgs_from_config.py + distro == alma-8.8, rocky-8.8 + discover+: + test+<: + - conversion-method/rhsm_eus_account_conversion - /mismatch_errors: + /rhsm_els_conversion: + enabled: false adjust+: - enabled: true when: > - distro == centos-8, oracle-8, alma-8-latest, rocky-8-latest + distro == centos-7, oracle-7 + because: The ELS offering is applicable to EL7 only. + discover+: + test+<: + - conversion-method/rhsm_els_conversion + + /custom_repositories_conversion: + environment+: + SUBMGR_DISABLED_SKIP_CHECK_RHSM_CUSTOM_FACTS: 1 prepare+: - - name: Install multilib packages with dnf - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_multilib_packages.py + - name: Add custom repositories + how: ansible + playbook: tests/ansible_collections/roles/add-custom-repos/main.yml + discover+: + test+<: + - conversion-method/custom_repos_conversion + # Exclude the rhel_subman check, we don't use RHSM for the conversion + exclude: + - checks-after-conversion/rhel_subman - /resolve_dependency: - adjust+: - - enabled: true - when: distro == centos, oracle - because: We do not have any tracked packages with Rocky and Alma for this test case - summary+: | - Handle dependency packages - description+: | - This case installs a couple of packages that we know cause dependency - issues during the package replacement, so the intention of this is to - assert that convert2rhel can handle those packages and not fail during the - replacement, especially with the yum transaction. + + /single_yum_transaction: + /packages_upgraded_after_conversion: + discover+: + test+<: + - single-yum-transaction/packages_upgraded_after_conversion + + /observe_errors: + enabled: false + discover+: + test+<: + - single-yum-transaction/single_yum_transaction + + /all_errors: + adjust+: + - enabled: true + when: > + distro == oracle-7 + prepare+: + - name: Install ntp package and remove one dependency + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_ntp_and_remove_dependency.py + + /excluded_packages: + adjust+: + - enabled: true + when: distro == centos-7 + prepare+: + - name: Remove some packages from the excluded packages config list + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/remove_excld_pkgs_from_config.py + + /mismatch_errors: + adjust+: + - enabled: true + when: > + distro == centos-8, oracle-8, alma-8-latest, rocky-8-latest + prepare+: + - name: Install multilib packages with dnf + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_multilib_packages.py + + /resolve_dependency: + adjust+: + - enabled: true + when: distro == centos, oracle + because: We do not have any tracked packages with Rocky and Alma for this test case + summary+: | + Handle dependency packages + description+: | + This case installs a couple of packages that we know cause dependency + issues during the package replacement, so the intention of this is to + assert that convert2rhel can handle those packages and not fail during the + replacement, especially with the yum transaction. + prepare+: + - name: Install dependency packages + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_dependency_packages.py + + /yum_distro_sync: prepare+: - - name: Install dependency packages - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/single-yum-transaction/install_dependency_packages.py + - name: enable CentOS' extras repo + how: ansible + playbook: tests/integration/tier0/destructive/yum-distro-sync/add-extras-repo/main.yml + - name: Install problematic package + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/yum-distro-sync/install_problematic_package.py + discover+: + test+<: + - yum-distro-sync/yum_distro_sync + - /yum_distro_sync: + /isolated_system_conversion: prepare+: - - name: enable CentOS' extras repo - how: ansible - playbook: tests/integration/tier0/destructive/yum-distro-sync/add-extras-repo/main.yml - - name: Install problematic package - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/yum-distro-sync/install_problematic_package.py + - name: Allow access to Satellite only + how: shell + script: pytest --setup-show -svv tests/integration/*/destructive/isolated-system-conversion/prepare_system.py discover+: test+<: - - yum-distro-sync/yum_distro_sync - - - /isolated_system_conversion: - prepare+: - - name: Allow access to Satellite only - how: shell - script: pytest --setup-show -svv tests/integration/*/destructive/isolated-system-conversion/prepare_system.py - discover+: - test+<: - - isolated-system-conversion/isolated_system_conversion - # Exclude the rhel_subman check, we don't use RHSM for the conversion - exclude: - - checks-after-conversion/rhel_subman + - isolated-system-conversion/isolated_system_conversion + # Exclude the rhel_subman check, we don't use RHSM for the conversion + exclude: + - checks-after-conversion/rhel_subman diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index f1880880ea..be2dadbab0 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -461,7 +461,7 @@ def missing_os_release_package_workaround(shell): # package is missing from the system, including the /etc/system-release file os_name = SYSTEM_RELEASE_ENV.split("-")[0] os_ver = SYSTEM_RELEASE_ENV.split("-")[1] - os_key = f"{os_name}-{os_ver}" + os_key = f"{os_name}-{os_ver[0]}" system_release_pkgs = os_to_pkg_mapping.get(os_key) diff --git a/tests/integration/tier0/non-destructive/single-yum-transaction-validation/main.fmf b/tests/integration/tier0/non-destructive/single-yum-transaction-validation/main.fmf index b76fd8b39e..a871610a2e 100644 --- a/tests/integration/tier0/non-destructive/single-yum-transaction-validation/main.fmf +++ b/tests/integration/tier0/non-destructive/single-yum-transaction-validation/main.fmf @@ -19,14 +19,16 @@ tag+: /transaction_validation_error: + enabled: false summary+: | Error during processing the transaction description+: | This test case removes the certs during the transaction processing to throw the following yum error: pkgmanager.Errors.YumDownloadError adjust+: - - enabled: false - when: distro == centos-8, alma-8, rocky-8, oracle-8 + - enabled: true + when: distro == centos-7, oracle-7 + because: This scenario is valid only for systems with yum as the package manager. tag+: - transaction-validation-error test: | diff --git a/tests/integration/tier1/destructive/multiple-nic/multiple_nic.py b/tests/integration/tier1/destructive/multiple-nic/multiple_nic.py index 2b4e20c7e2..54fa438c5e 100644 --- a/tests/integration/tier1/destructive/multiple-nic/multiple_nic.py +++ b/tests/integration/tier1/destructive/multiple-nic/multiple_nic.py @@ -2,4 +2,4 @@ def test_check_provisioned_machine(shell): assert shell("ip link show").returncode == 0 # Make sure we have at least 2 non-loopback NICs non_loopback_nics = shell("ip -br link show | grep -v LOOPBACK | wc -l") - assert int(non_loopback_nics.output) >= 2 + assert int(non_loopback_nics.output.strip()) >= 2