From 2a0ed4006341f2bab7624cfe4abb02507a8cbbe7 Mon Sep 17 00:00:00 2001 From: Daniel Diblik <8378124+danmyway@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:44:21 +0200 Subject: [PATCH] [RHELC-1105] Try using SCA enabled account in tests (#1186) * Try using SCA enabled account in tests Signed-off-by: Daniel Diblik * Switch order of conditions in outdated_kernel fixture Signed-off-by: Daniel Diblik * Adjust tests after rebase, add non-sca tags Signed-off-by: Daniel Diblik --------- Signed-off-by: Daniel Diblik --- plans/tier1.fmf | 6 ++++ tests/ansible_collections/group_vars/all.yml | 5 ++-- tests/integration/conftest.py | 30 ++++++++----------- .../conversion-method/test_activation_key.py | 4 +-- .../conversion-method/test_config_file.py | 2 +- .../conversion-method/test_rhsm.py | 7 ++--- .../conversion-method/test_rhsm_eus.py | 4 +-- .../test_check_for_latest_packages.py | 7 ++--- .../test_single_yum_transaction.py | 7 ++--- .../yum-distro-sync/test_yum_distro_sync.py | 7 ++--- .../test_assessment_report.py | 16 +++++----- .../config-file/test_config_file.py | 8 ++--- .../duplicate-pkgs/test_duplicate_pkgs.py | 4 +-- .../tier0/non-destructive/els/main.fmf | 2 ++ .../els/test_els_enablement.py | 2 ++ .../tier0/non-destructive/eus/main.fmf | 1 + .../eus/test_eus_enablement.py | 7 ++++- .../test_firewalld_inhibitor.py | 2 +- .../kernel-modules/test_unsupported_kmod.py | 27 ++++++++--------- .../test_modified_releasever.py | 14 ++++----- .../test_problematic_third_party_pkgs.py | 4 +-- .../test_rollback_handling.py | 15 +++++----- .../test_single_yum_transaction_validation.py | 28 ++++++++--------- .../subscription-manager/main.fmf | 7 ++--- .../test_sub_man_pre_register.py | 5 +++- .../test_sub_man_rollback.py | 7 ++--- .../test_user_prompt_response.py | 6 ++-- .../test_invalid_changed_grub.py | 7 ++--- .../test_valid_changed_grub.py | 7 ++--- .../changed-yum-conf/test_patch_yum_conf.py | 7 ++--- .../test_detect_correct_boot_partition.py | 7 ++--- .../test_excluded_pkgs_removed.py | 7 ++--- .../test_firewalld_disabled_ol8.py | 2 +- .../test_run_conversion_with_metering.py | 4 +-- .../test_handle_corrupted_files.py | 7 ++--- .../test_handle_missing_boot_files.py | 7 ++--- .../test_latest_kernel_check_skip.py | 7 ++--- .../test_system_not_up_to_date.py | 14 ++++----- .../test_pkg_removed_from_centos_85.py | 7 ++--- .../test_yum_conf_exclude_packages.py | 7 ++--- .../test_httpd_package_transaction_error.py | 7 ++--- 41 files changed, 156 insertions(+), 175 deletions(-) diff --git a/plans/tier1.fmf b/plans/tier1.fmf index 3fd108ef45..72025dbb4e 100644 --- a/plans/tier1.fmf +++ b/plans/tier1.fmf @@ -226,6 +226,12 @@ adjust+: - kernel-boot-files/missing_kernel_boot_files /corrupted_initramfs_file: + adjust+: + - enabled: false + when: distro == alma-8-latest, alma-9-latest, rocky-8.8 + because: | + An unhandled UnicodeDecodeError breaks the conversion. + Reference https://issues.redhat.com/browse/RHELC-1711 discover+: test+<: - kernel-boot-files/corrupted_initramfs_file diff --git a/tests/ansible_collections/group_vars/all.yml b/tests/ansible_collections/group_vars/all.yml index 9176703d45..aa5e8fec58 100644 --- a/tests/ansible_collections/group_vars/all.yml +++ b/tests/ansible_collections/group_vars/all.yml @@ -3,7 +3,6 @@ build_rpm: "{{ lookup('env', 'ANSIBLE_BUILD_RPM') }}" rpm_provider: "{{ lookup('env', 'ANSIBLE_RPM_PROVIDER') }}" rpm_url_el7: "{{ lookup('env', 'ANSIBLE_RPM_URL_EL7') }}" rpm_url_el8: "{{ lookup('env', 'ANSIBLE_RPM_URL_EL8') }}" -rhsm_pool: "{{ lookup('env', 'RHSM_POOL') }}" -rhsm_password: "{{ lookup('env', 'RHSM_PASSWORD') }}" -rhsm_username: "{{ lookup('env', 'RHSM_USERNAME') }}" +rhsm_password: "{{ lookup('env', 'RHSM_SCA_PASSWORD') }}" +rhsm_username: "{{ lookup('env', 'RHSM_SCA_USERNAME') }}" rhsm_server_url: "{{ lookup('env', 'RHSM_SERVER_URL') }}" diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 7e0cd44417..47277ce76f 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -221,13 +221,12 @@ def convert2rhel(shell): >>> ( >>> "-y " >>> "--serverurl {} --username {} " - >>> "--password {} --pool {} " + >>> "--password {} " >>> "--debug" >>> ).format( >>> TEST_VARS["RHSM_SERVER_URL"], - >>> TEST_VARS["RHSM_USERNAME"], - >>> TEST_VARS["RHSM_PASSWORD"], - >>> TEST_VARS["RHSM_POOL"], + >>> TEST_VARS["RHSM_SCA_USERNAME"], + >>> TEST_VARS["RHSM_SCA_PASSWORD"], >>> ) >>> ) as c2r: >>> c2r.expect("Kernel is compatible with RHEL") @@ -607,14 +606,14 @@ def pre_registered(shell, request): A fixture to install subscription manager and pre-register the system prior to the convert2rhel run. We're using the client-tools-for-rhel--rpms repository to install the subscription-manager package from. The rhn-client-tools package obsoletes the subscription-manager, so we remove the package on Oracle Linux. - By default, the RHSM_USERNAME and RHSM_PASSWORD is passed to the subman registration. + By default, the RHSM_SCA_USERNAME and RHSM_SCA_PASSWORD is passed to the subman registration. Can be parametrized by requesting a different KEY from the TEST_VARS file. @pytest.mark.parametrize("pre_registered", [("DIFFERENT_USERNAME", "DIFFERENT_PASSWORD")], indirect=True) """ subman = SubscriptionManager() - username = TEST_VARS["RHSM_USERNAME"] - password = TEST_VARS["RHSM_PASSWORD"] + username = TEST_VARS["RHSM_SCA_USERNAME"] + password = TEST_VARS["RHSM_SCA_PASSWORD"] # Use custom keys when the fixture is parametrized if hasattr(request, "param"): username_key, password_key = request.param @@ -635,9 +634,6 @@ def pre_registered(shell, request): == 0 ) - if "C2R_TESTS_NOSUB" not in os.environ: - assert shell("subscription-manager attach --pool {}".format(TEST_VARS["RHSM_POOL"])).returncode == 0 - rhsm_uuid_command = "subscription-manager identity | grep identity" uuid_raw_output = shell(rhsm_uuid_command).output @@ -745,12 +741,6 @@ def outdated_kernel(shell, hybrid_rocky_image): pytest.skip("The `kernel` fixture has already run.") if os.environ["TMT_REBOOT_COUNT"] == "0": - # Verify that there is multiple kernels installed - if int(shell("rpm -q kernel | wc -l").output.strip()) > 1: - # We don't need to do anything at this point - # The whole setup needed happens after - pass - # There won't be much changes for EL 7 packages anymore # We can hardcode this then # The release part differs a bit on CentOS and Oracle, @@ -759,11 +749,17 @@ def outdated_kernel(shell, hybrid_rocky_image): older_kernel = "kernel-3.10.0-1160.118*" assert shell(f"yum install -y {older_kernel}").returncode == 0 + # Verify that there is multiple kernels installed + if int(shell("rpm -q kernel | wc -l").output.strip()) > 1: + # We don't need to do anything at this point + # The whole setup needed happens after + pass + # Try to downgrade kernel version, if there is not multiple versions installed already. # If the kernel downgrade fails, assume it's not possible and try to install from # an older repo. This should only happen when Alma and Rocky has just landed on # a fresh minor version. - elif shell("yum downgrade kernel -y").returncode != 0: + elif shell("yum downgrade kernel -y").returncode == 1: # Assuming this can only happen with Alma and Rocky we'll try to install an older kernel # from a previous minor version. # For that we need to use the vault url and bump te current minor down one version. diff --git a/tests/integration/tier0/destructive/conversion-method/test_activation_key.py b/tests/integration/tier0/destructive/conversion-method/test_activation_key.py index 58271cc30d..fb2caddcfc 100644 --- a/tests/integration/tier0/destructive/conversion-method/test_activation_key.py +++ b/tests/integration/tier0/destructive/conversion-method/test_activation_key.py @@ -8,8 +8,8 @@ def test_activation_key_conversion(convert2rhel): with convert2rhel( "-y --serverurl {} -k {} -o {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_KEY"], - TEST_VARS["RHSM_ORG"], + TEST_VARS["RHSM_SCA_KEY"], + TEST_VARS["RHSM_SCA_ORG"], ) ) as c2r: c2r.expect("Conversion successful!") diff --git a/tests/integration/tier0/destructive/conversion-method/test_config_file.py b/tests/integration/tier0/destructive/conversion-method/test_config_file.py index a8274eadc9..6efd34b829 100644 --- a/tests/integration/tier0/destructive/conversion-method/test_config_file.py +++ b/tests/integration/tier0/destructive/conversion-method/test_config_file.py @@ -26,7 +26,7 @@ def test_conversion_with_config_file(convert2rhel): Use config file to feed the credentials for the registration and verify a successful conversion. """ activation_key = "[subscription_manager]\nactivation_key = {}\norg = {}".format( - TEST_VARS["RHSM_KEY"], TEST_VARS["RHSM_ORG"] + TEST_VARS["RHSM_SCA_KEY"], TEST_VARS["RHSM_SCA_ORG"] ) config = [Config("~/.convert2rhel.ini", activation_key)] create_files(config) diff --git a/tests/integration/tier0/destructive/conversion-method/test_rhsm.py b/tests/integration/tier0/destructive/conversion-method/test_rhsm.py index d67fa8af5d..47d1db7bc3 100644 --- a/tests/integration/tier0/destructive/conversion-method/test_rhsm.py +++ b/tests/integration/tier0/destructive/conversion-method/test_rhsm.py @@ -3,11 +3,10 @@ def test_rhsm_conversion(convert2rhel): with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Conversion successful!") diff --git a/tests/integration/tier0/destructive/conversion-method/test_rhsm_eus.py b/tests/integration/tier0/destructive/conversion-method/test_rhsm_eus.py index 71b7d0f04a..7ea682486c 100644 --- a/tests/integration/tier0/destructive/conversion-method/test_rhsm_eus.py +++ b/tests/integration/tier0/destructive/conversion-method/test_rhsm_eus.py @@ -14,8 +14,8 @@ def test_rhsm_with_eus_system_conversion(convert2rhel, shell): with convert2rhel( "-y --serverurl {} --username {} --password {} --debug --eus".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect_exact("Enabling RHEL repositories:") diff --git a/tests/integration/tier0/destructive/single-yum-transaction/test_check_for_latest_packages.py b/tests/integration/tier0/destructive/single-yum-transaction/test_check_for_latest_packages.py index 86d463e6fb..17362af22f 100644 --- a/tests/integration/tier0/destructive/single-yum-transaction/test_check_for_latest_packages.py +++ b/tests/integration/tier0/destructive/single-yum-transaction/test_check_for_latest_packages.py @@ -35,11 +35,10 @@ def test_packages_upgraded_after_conversion(convert2rhel, shell): # Run utility until the reboot with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Conversion successful!") diff --git a/tests/integration/tier0/destructive/single-yum-transaction/test_single_yum_transaction.py b/tests/integration/tier0/destructive/single-yum-transaction/test_single_yum_transaction.py index 93ccc8bd03..5cbdb32a5c 100644 --- a/tests/integration/tier0/destructive/single-yum-transaction/test_single_yum_transaction.py +++ b/tests/integration/tier0/destructive/single-yum-transaction/test_single_yum_transaction.py @@ -15,11 +15,10 @@ def test_single_yum_transaction(convert2rhel, shell): pkgmanager = "dnf" with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("no modifications to the system will happen this time.", timeout=1200) diff --git a/tests/integration/tier0/destructive/yum-distro-sync/test_yum_distro_sync.py b/tests/integration/tier0/destructive/yum-distro-sync/test_yum_distro_sync.py index fc73b532da..e102c63827 100644 --- a/tests/integration/tier0/destructive/yum-distro-sync/test_yum_distro_sync.py +++ b/tests/integration/tier0/destructive/yum-distro-sync/test_yum_distro_sync.py @@ -22,11 +22,10 @@ def test_yum_distro_sync(convert2rhel, shell): """ with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Conversion successful!") diff --git a/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py b/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py index a70e61eb11..a86c033693 100644 --- a/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py +++ b/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py @@ -47,7 +47,7 @@ def test_failures_and_skips_in_report(convert2rhel): and it corresponds to its respective schema. """ with convert2rhel( - "analyze --serverurl {} --username test --password test --pool a_pool --debug".format( + "analyze --serverurl {} --username test --password test --debug".format( TEST_VARS["RHSM_SERVER_URL"], ) ) as c2r: @@ -94,11 +94,10 @@ def test_successful_report(convert2rhel): And does not contain: Error header, Skip header. """ with convert2rhel( - "analyze --serverurl {} --username {} --password {} --pool {} --debug".format( + "analyze --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: # We need to get past the data collection acknowledgement. @@ -137,11 +136,10 @@ def test_convert_method_successful_report(convert2rhel): Success header, Error header, Skip header. """ with convert2rhel( - "convert --serverurl {} --username {} --password {} --pool {} --debug".format( + "convert --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: # We need to get past the data collection acknowledgement. diff --git a/tests/integration/tier0/non-destructive/config-file/test_config_file.py b/tests/integration/tier0/non-destructive/config-file/test_config_file.py index 58ebdc9c0f..b1d885e859 100644 --- a/tests/integration/tier0/non-destructive/config-file/test_config_file.py +++ b/tests/integration/tier0/non-destructive/config-file/test_config_file.py @@ -140,8 +140,8 @@ def test_config_standard_paths_priority_diff_methods(convert2rhel, shell): # fmt: off ( "[subscription_manager]\n" - f"activation_key = {TEST_VARS['RHSM_KEY']}\n" - f"org = {TEST_VARS['RHSM_ORG']}\n" + f"activation_key = {TEST_VARS['RHSM_SCA_KEY']}\n" + f"org = {TEST_VARS['RHSM_SCA_ORG']}\n" ), # fmt: on ), @@ -182,8 +182,8 @@ def test_config_standard_paths_priority(convert2rhel): # fmt: off ( "[subscription_manager]\n" - f"username = {TEST_VARS['RHSM_USERNAME']}\n" - f"password = {TEST_VARS['RHSM_PASSWORD']}\n" + f"username = {TEST_VARS['RHSM_SCA_USERNAME']}\n" + f"password = {TEST_VARS['RHSM_SCA_PASSWORD']}\n" ), # fmt: on ), diff --git a/tests/integration/tier0/non-destructive/duplicate-pkgs/test_duplicate_pkgs.py b/tests/integration/tier0/non-destructive/duplicate-pkgs/test_duplicate_pkgs.py index 2f66c2d8c6..3295b00e50 100644 --- a/tests/integration/tier0/non-destructive/duplicate-pkgs/test_duplicate_pkgs.py +++ b/tests/integration/tier0/non-destructive/duplicate-pkgs/test_duplicate_pkgs.py @@ -54,8 +54,8 @@ def test_duplicate_packages_installed(convert2rhel, install_duplicate_pkg): with convert2rhel( "analyze -y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: # The error about duplicate packages should be included at the end of the pre-conversion analysis report diff --git a/tests/integration/tier0/non-destructive/els/main.fmf b/tests/integration/tier0/non-destructive/els/main.fmf index 2bbd275b68..2dbfe4fa78 100644 --- a/tests/integration/tier0/non-destructive/els/main.fmf +++ b/tests/integration/tier0/non-destructive/els/main.fmf @@ -32,7 +32,9 @@ adjust+: Verify that Convert2RHEL is working properly when ELS repositories are not available for conversions (the account does not have the ELS SKU available) to RHEL ELS version (7.9) and the --els option is provided. The regular repositories should be enabled as a fallback option. + We're deliberately using SCA disabled account for this scenario. tag+: - test-rhsm-non-els-account + - non-sca test: | pytest -m test_rhsm_non_els_account diff --git a/tests/integration/tier0/non-destructive/els/test_els_enablement.py b/tests/integration/tier0/non-destructive/els/test_els_enablement.py index 460a1a502a..3adbfe5dcb 100644 --- a/tests/integration/tier0/non-destructive/els/test_els_enablement.py +++ b/tests/integration/tier0/non-destructive/els/test_els_enablement.py @@ -96,11 +96,13 @@ def test_rhsm_non_els_account(convert2rhel): Verify that Convert2RHEL is working properly when ELS repositories are not available for conversions (the account does not have the ELS SKU available) to RHEL ELS version (7.9) and the --els option is provided. The regular repositories should be enabled as a fallback option. + We're deliberately using SCA disabled account for this scenario. """ with convert2rhel( "analyze -y --serverurl {} --username {} --password {} --debug --els".format( TEST_VARS["RHSM_SERVER_URL"], + # We're deliberately using SCA disabled account for this TEST_VARS["RHSM_USERNAME"], TEST_VARS["RHSM_PASSWORD"], ) diff --git a/tests/integration/tier0/non-destructive/eus/main.fmf b/tests/integration/tier0/non-destructive/eus/main.fmf index 2be8039516..f9f7db1e87 100644 --- a/tests/integration/tier0/non-destructive/eus/main.fmf +++ b/tests/integration/tier0/non-destructive/eus/main.fmf @@ -40,5 +40,6 @@ adjust+: should be enabled. tag+: - test-rhsm-non-eus-account + - non-sca test: | pytest -m test_rhsm_non_eus_account diff --git a/tests/integration/tier0/non-destructive/eus/test_eus_enablement.py b/tests/integration/tier0/non-destructive/eus/test_eus_enablement.py index ecec53d6a7..d4936ccf34 100644 --- a/tests/integration/tier0/non-destructive/eus/test_eus_enablement.py +++ b/tests/integration/tier0/non-destructive/eus/test_eus_enablement.py @@ -89,7 +89,10 @@ def test_eus_enablement( eus_mapping_update(modified_mapping) with convert2rhel( "analyze -y --debug --serverurl {} -u {} -p {} {}".format( - TEST_VARS["RHSM_SERVER_URL"], TEST_VARS["RHSM_USERNAME"], TEST_VARS["RHSM_PASSWORD"], additional_option + TEST_VARS["RHSM_SERVER_URL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], + additional_option, ) ) as c2r: c2r.expect(repoid_message, timeout=120) @@ -115,11 +118,13 @@ def test_rhsm_non_eus_account(convert2rhel): Verify that Convert2RHEL is working properly when EUS repositories are not available for conversions (the account does not have the EUS SKU available) to RHEL EUS minor versions (8.6, ...) and the --eus option is provided. The regular repositories should be enabled as a fallback option. + We're deliberately using SCA disabled account for this scenario. """ with convert2rhel( "analyze -y --serverurl {} --username {} --password {} --debug --eus".format( TEST_VARS["RHSM_SERVER_URL"], + # We're deliberately using SCA disabled account for this scenario. TEST_VARS["RHSM_NON_EUS_USERNAME"], TEST_VARS["RHSM_NON_EUS_PASSWORD"], ) diff --git a/tests/integration/tier0/non-destructive/firewalld-inhibitor/test_firewalld_inhibitor.py b/tests/integration/tier0/non-destructive/firewalld-inhibitor/test_firewalld_inhibitor.py index c8e2f33d25..ec21bd95d4 100644 --- a/tests/integration/tier0/non-destructive/firewalld-inhibitor/test_firewalld_inhibitor.py +++ b/tests/integration/tier0/non-destructive/firewalld-inhibitor/test_firewalld_inhibitor.py @@ -25,7 +25,7 @@ def test_firewalld_inhibitor(shell, convert2rhel): with convert2rhel( "-y --debug --serverurl {} --username {} --password {}".format( - TEST_VARS["RHSM_SERVER_URL"], TEST_VARS["RHSM_USERNAME"], TEST_VARS["RHSM_PASSWORD"] + TEST_VARS["RHSM_SERVER_URL"], TEST_VARS["RHSM_SCA_USERNAME"], TEST_VARS["RHSM_SCA_PASSWORD"] ), unregister=True, ) as c2r: diff --git a/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py b/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py index 5ced6e8fc6..131684a52f 100644 --- a/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py +++ b/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py @@ -36,11 +36,10 @@ def test_inhibitor_with_unavailable_kmod_loaded(kmod_in_different_directory, con ENSURE_KERNEL_MODULES_COMPATIBILITY.UNSUPPORTED_KERNEL_MODULES. """ with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ), unregister=True, ) as c2r: @@ -60,12 +59,11 @@ def test_override_inhibitor_with_unavailable_kmod_loaded( """ environment_variables(envars) with convert2rhel( - "--serverurl {} --username {} --password {} --pool {} --debug".format( + "--serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], - ) + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], + ), ) as c2r: c2r.expect("Continue with the system conversion?") c2r.sendline("y") @@ -123,8 +121,8 @@ def test_override_inhibitor_with_tainted_kmod(shell, convert2rhel, forced_kmods, with convert2rhel( "--serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ), unregister=True, ) as c2r: @@ -178,11 +176,10 @@ def test_inhibitor_with_custom_built_tainted_kmod(custom_kmod, convert2rhel): """ with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ), unregister=True, ) as c2r: diff --git a/tests/integration/tier0/non-destructive/modified-releasever/test_modified_releasever.py b/tests/integration/tier0/non-destructive/modified-releasever/test_modified_releasever.py index 7974ee7cf5..18701dbf0c 100644 --- a/tests/integration/tier0/non-destructive/modified-releasever/test_modified_releasever.py +++ b/tests/integration/tier0/non-destructive/modified-releasever/test_modified_releasever.py @@ -31,11 +31,10 @@ def test_releasever_modified_in_c2r_config(convert2rhel, os_release, c2r_config, """ with c2r_config.replace_line(pattern="releasever=.*", repl="releasever=333"): with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ), unregister=True, ) as c2r: @@ -71,11 +70,10 @@ def test_inhibitor_releasever_noexistent_release(convert2rhel, config_at, os_rel f"release {os_release.version[0]}.11.1111", ): with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ), unregister=True, ) as c2r: diff --git a/tests/integration/tier0/non-destructive/problematic-third-party-pkgs/test_problematic_third_party_pkgs.py b/tests/integration/tier0/non-destructive/problematic-third-party-pkgs/test_problematic_third_party_pkgs.py index 7176d24446..db0f762819 100644 --- a/tests/integration/tier0/non-destructive/problematic-third-party-pkgs/test_problematic_third_party_pkgs.py +++ b/tests/integration/tier0/non-destructive/problematic-third-party-pkgs/test_problematic_third_party_pkgs.py @@ -37,8 +37,8 @@ def test_list_third_party_pkgs(convert2rhel, problematic_third_party_package): with convert2rhel( "analyze -y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: # Verify that the analysis report is printed diff --git a/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py b/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py index e2d13cbe75..3d8f227b56 100644 --- a/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py +++ b/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py @@ -170,11 +170,10 @@ def test_proper_rhsm_clean_up(shell, convert2rhel): packages_to_remove_at_cleanup = install_packages(shell, assign_packages()) with convert2rhel( - "analyze --serverurl {} --username {} --password {} --pool {} --debug".format( + "analyze --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Continue with the system conversion?") @@ -235,8 +234,8 @@ def test_terminate_on_registration_start(convert2rhel): with convert2rhel( "--debug -y --serverurl {} --username {} --password {}".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ), unregister=True, ) as c2r: @@ -255,8 +254,8 @@ def test_terminate_on_registration_success(convert2rhel): with convert2rhel( "--debug -y --serverurl {} --username {} --password {}".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ), unregister=True, ) as c2r: diff --git a/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py b/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py index 7f98496eec..6957ee23ac 100644 --- a/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py +++ b/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py @@ -74,11 +74,10 @@ def test_package_download_error(convert2rhel, shell, yum_cache): transaction. """ with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Validate the {} transaction".format(PKGMANAGER)) @@ -115,11 +114,10 @@ def test_transaction_validation_error(convert2rhel, shell, yum_cache): tool is doing a proper rollback when the transaction is being processed. """ with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect( @@ -176,11 +174,10 @@ def test_packages_with_in_name_period(shell, convert2rhel, packages_with_period) """ with convert2rhel( - "analyze --serverurl {} --username {} --password {} --pool {} --debug".format( + "analyze --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: # Swallow the data collection warning @@ -219,11 +216,10 @@ def test_override_exclude_list_in_yum_config(convert2rhel, outdated_kernel, yum_ if os.environ["TMT_REBOOT_COUNT"] == "1": try: with convert2rhel( - "analyze --serverurl {} --username {} --password {} --pool {} --debug -y".format( + "analyze --serverurl {} --username {} --password {} --debug -y".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("VALIDATE_PACKAGE_MANAGER_TRANSACTION has succeeded") diff --git a/tests/integration/tier0/non-destructive/subscription-manager/main.fmf b/tests/integration/tier0/non-destructive/subscription-manager/main.fmf index 3b7955c2c1..3ea01a75eb 100644 --- a/tests/integration/tier0/non-destructive/subscription-manager/main.fmf +++ b/tests/integration/tier0/non-destructive/subscription-manager/main.fmf @@ -95,12 +95,11 @@ tag+: description+: | This test verifies that running conversion on pre-registered system without an attached subscription will try auto attaching the subscription. - environment+: - C2R_TESTS_NOSUB: 1 test: | pytest -m test_no_sca_not_subscribed tag+: - no-sca-not-subscribed + - non-sca /no_sca_subscription_attachment_error: summary+: | @@ -110,9 +109,9 @@ tag+: without an attached subscription will try auto attaching the subscription. When the attachment fails, the SUBSCRIBE_SYSTEM::NO_ACCESS_TO_RHEL_REPOS error is raised. - environment+: - C2R_TESTS_NOSUB: 1 + We're deliberately using SCA disabled account without any available subscriptions for this scenario. test: | pytest -m test_no_sca_subscription_attachment_error tag+: - no-sca-subscription-attachment-error + - non-sca diff --git a/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py b/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py index 44ec1404bd..1c3ddf6e79 100644 --- a/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py +++ b/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py @@ -42,7 +42,7 @@ def test_pre_registered_re_register(shell, pre_registered, convert2rhel): """ with convert2rhel( "--debug --serverurl {} --username {} --password {}".format( - TEST_VARS["RHSM_SERVER_URL"], TEST_VARS["RHSM_USERNAME"], TEST_VARS["RHSM_PASSWORD"] + TEST_VARS["RHSM_SERVER_URL"], TEST_VARS["RHSM_SCA_USERNAME"], TEST_VARS["RHSM_SCA_PASSWORD"] ) ) as c2r: # We need to get past the data collection acknowledgement. @@ -74,10 +74,12 @@ def test_unregistered_no_credentials(shell, convert2rhel): assert c2r.exitstatus == 2 +@pytest.mark.parametrize("pre_registered", [("RHSM_USERNAME", "RHSM_PASSWORD")], indirect=True) def test_no_sca_not_subscribed(shell, pre_registered, convert2rhel): """ This test verifies that running conversion on pre-registered system without an attached subscription will try auto attaching the subscription. + SCA disabled account is used for this scenario. """ with convert2rhel("--debug") as c2r: # We need to get past the data collection acknowledgement. @@ -101,6 +103,7 @@ def test_no_sca_subscription_attachment_error(shell, convert2rhel, pre_registere without an attached subscription will try auto attaching the subscription. When the attachment fails, the SUBSCRIBE_SYSTEM::NO_ACCESS_TO_RHEL_REPOS error is raised. + We're deliberately using SCA disabled account without any available subscriptions for this scenario. """ with convert2rhel("--debug") as c2r: # We need to get past the data collection acknowledgement. diff --git a/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_rollback.py b/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_rollback.py index 0d431e8757..ba4baf546c 100644 --- a/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_rollback.py +++ b/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_rollback.py @@ -19,11 +19,10 @@ def test_sub_man_rollback(convert2rhel, shell, required_packages): # due to not being able to expand the $releasever variable for run in range(2): with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: assert c2r.expect("Validate the dnf transaction") == 0 diff --git a/tests/integration/tier0/non-destructive/user-prompt-response/test_user_prompt_response.py b/tests/integration/tier0/non-destructive/user-prompt-response/test_user_prompt_response.py index 9e01def070..c511d8fc69 100644 --- a/tests/integration/tier0/non-destructive/user-prompt-response/test_user_prompt_response.py +++ b/tests/integration/tier0/non-destructive/user-prompt-response/test_user_prompt_response.py @@ -19,15 +19,13 @@ def test_empty_user_response_username_and_password(convert2rhel): retries = 0 while True: - c2r.sendline(TEST_VARS["RHSM_USERNAME"]) - print("Sending username:", TEST_VARS["RHSM_USERNAME"]) + c2r.sendline(TEST_VARS["RHSM_SCA_USERNAME"]) c2r.expect("Password: ") c2r.sendline() try: assert c2r.expect("Password", timeout=300) == 0 # Provide password, expect successful registration and subscription prompt - c2r.sendline(TEST_VARS["RHSM_PASSWORD"]) - print("Sending password") + c2r.sendline(TEST_VARS["RHSM_SCA_PASSWORD"]) assert c2r.expect("System registration succeeded", timeout=180) == 0 break except Exception: diff --git a/tests/integration/tier1/destructive/changed-grub-file/test_invalid_changed_grub.py b/tests/integration/tier1/destructive/changed-grub-file/test_invalid_changed_grub.py index a82c3c6578..ebb73ea880 100644 --- a/tests/integration/tier1/destructive/changed-grub-file/test_invalid_changed_grub.py +++ b/tests/integration/tier1/destructive/changed-grub-file/test_invalid_changed_grub.py @@ -23,11 +23,10 @@ def test_invalid_changes_to_grub_file(convert2rhel): print(line, end="") with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: assert c2r.expect("GRUB2 config file generation failed.") == 0 diff --git a/tests/integration/tier1/destructive/changed-grub-file/test_valid_changed_grub.py b/tests/integration/tier1/destructive/changed-grub-file/test_valid_changed_grub.py index 0e9b653547..e8cfe3e275 100644 --- a/tests/integration/tier1/destructive/changed-grub-file/test_valid_changed_grub.py +++ b/tests/integration/tier1/destructive/changed-grub-file/test_valid_changed_grub.py @@ -34,11 +34,10 @@ def test_valid_changes_to_grub_file(convert2rhel): print(line, end="") with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: assert c2r.expect("Successfully updated GRUB2 on the system.") == 0 diff --git a/tests/integration/tier1/destructive/changed-yum-conf/test_patch_yum_conf.py b/tests/integration/tier1/destructive/changed-yum-conf/test_patch_yum_conf.py index cb1d28adaa..4dee747eae 100644 --- a/tests/integration/tier1/destructive/changed-yum-conf/test_patch_yum_conf.py +++ b/tests/integration/tier1/destructive/changed-yum-conf/test_patch_yum_conf.py @@ -14,11 +14,10 @@ def test_yum_conf_patch(convert2rhel, shell): pkgmanager_conf = "/etc/dnf/dnf.conf" with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("{} patched.".format(pkgmanager_conf)) diff --git a/tests/integration/tier1/destructive/detect-bootloader-partition/test_detect_correct_boot_partition.py b/tests/integration/tier1/destructive/detect-bootloader-partition/test_detect_correct_boot_partition.py index fb13bcb4d7..6ab25d9c97 100644 --- a/tests/integration/tier1/destructive/detect-bootloader-partition/test_detect_correct_boot_partition.py +++ b/tests/integration/tier1/destructive/detect-bootloader-partition/test_detect_correct_boot_partition.py @@ -51,11 +51,10 @@ def test_detect_correct_boot_partition(convert2rhel): rhel_version = "7" with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: assert c2r.expect("Calling command '/usr/sbin/blkid -p -s PART_ENTRY_NUMBER %s'" % boot_device) == 0 diff --git a/tests/integration/tier1/destructive/excluded-packages-removed/test_excluded_pkgs_removed.py b/tests/integration/tier1/destructive/excluded-packages-removed/test_excluded_pkgs_removed.py index 4b7a1708f3..ffe2d5d7f1 100644 --- a/tests/integration/tier1/destructive/excluded-packages-removed/test_excluded_pkgs_removed.py +++ b/tests/integration/tier1/destructive/excluded-packages-removed/test_excluded_pkgs_removed.py @@ -20,11 +20,10 @@ def test_excluded_packages_removed(shell, convert2rhel): # run utility until the reboot with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: pass diff --git a/tests/integration/tier1/destructive/firewalld-disabled-ol8/test_firewalld_disabled_ol8.py b/tests/integration/tier1/destructive/firewalld-disabled-ol8/test_firewalld_disabled_ol8.py index 6fba7023c3..88e8ff7794 100644 --- a/tests/integration/tier1/destructive/firewalld-disabled-ol8/test_firewalld_disabled_ol8.py +++ b/tests/integration/tier1/destructive/firewalld-disabled-ol8/test_firewalld_disabled_ol8.py @@ -24,7 +24,7 @@ def test_firewalld_disabled_ol8(shell, convert2rhel): with convert2rhel( "-y --debug --serverurl {} --username {} --password {}".format( - TEST_VARS["RHSM_SERVER_URL"], TEST_VARS["RHSM_USERNAME"], TEST_VARS["RHSM_PASSWORD"] + TEST_VARS["RHSM_SERVER_URL"], TEST_VARS["RHSM_SCA_USERNAME"], TEST_VARS["RHSM_SCA_PASSWORD"] ), ) as c2r: c2r.expect("Firewalld service reported that it is not running.") diff --git a/tests/integration/tier1/destructive/host-metering/test_run_conversion_with_metering.py b/tests/integration/tier1/destructive/host-metering/test_run_conversion_with_metering.py index 3c3d3e76d1..a4dbae0df7 100644 --- a/tests/integration/tier1/destructive/host-metering/test_run_conversion_with_metering.py +++ b/tests/integration/tier1/destructive/host-metering/test_run_conversion_with_metering.py @@ -56,8 +56,8 @@ def test_run_conversion_with_host_metering(shell, convert2rhel): with convert2rhel( "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Installing host-metering packages") diff --git a/tests/integration/tier1/destructive/kernel-boot-files/test_handle_corrupted_files.py b/tests/integration/tier1/destructive/kernel-boot-files/test_handle_corrupted_files.py index acc193856d..6da87acd90 100644 --- a/tests/integration/tier1/destructive/kernel-boot-files/test_handle_corrupted_files.py +++ b/tests/integration/tier1/destructive/kernel-boot-files/test_handle_corrupted_files.py @@ -81,11 +81,10 @@ def test_handling_corrupted_initramfs_file(convert2rhel, shell): kernel_name = "kernel-core" with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Prepare: Final modifications to the system") diff --git a/tests/integration/tier1/destructive/kernel-boot-files/test_handle_missing_boot_files.py b/tests/integration/tier1/destructive/kernel-boot-files/test_handle_missing_boot_files.py index 0995fd7bcd..1abe6d6184 100644 --- a/tests/integration/tier1/destructive/kernel-boot-files/test_handle_missing_boot_files.py +++ b/tests/integration/tier1/destructive/kernel-boot-files/test_handle_missing_boot_files.py @@ -53,11 +53,10 @@ def test_handling_missing_kernel_boot_files(convert2rhel, shell): kernel_name = "kernel-core" with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Prepare: Final modifications to the system") diff --git a/tests/integration/tier1/destructive/kernel-check-skip/test_latest_kernel_check_skip.py b/tests/integration/tier1/destructive/kernel-check-skip/test_latest_kernel_check_skip.py index b5e2ed9480..f0d1274073 100644 --- a/tests/integration/tier1/destructive/kernel-check-skip/test_latest_kernel_check_skip.py +++ b/tests/integration/tier1/destructive/kernel-check-skip/test_latest_kernel_check_skip.py @@ -39,11 +39,10 @@ def test_latest_kernel_check_skip(shell, convert2rhel, backup_directory): shell("yum-config-manager --enable rhel-7-server-rpms --releasever 7Server") with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: # Make sure the kernel comparison is skipped diff --git a/tests/integration/tier1/destructive/system-not-up-to-date/test_system_not_up_to_date.py b/tests/integration/tier1/destructive/system-not-up-to-date/test_system_not_up_to_date.py index 2f1e74a1e6..bd2e63192d 100644 --- a/tests/integration/tier1/destructive/system-not-up-to-date/test_system_not_up_to_date.py +++ b/tests/integration/tier1/destructive/system-not-up-to-date/test_system_not_up_to_date.py @@ -51,11 +51,10 @@ def test_system_not_updated(shell, convert2rhel, downgrade_and_versionlock): packages. """ with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("WARNING - YUM/DNF versionlock plugin is in use. It may cause the conversion to fail.") @@ -70,11 +69,10 @@ def test_system_not_updated(shell, convert2rhel, downgrade_and_versionlock): # Run utility until the reboot with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("WARNING - YUM/DNF versionlock plugin is in use. It may cause the conversion to fail.") diff --git a/tests/integration/tier1/destructive/unavailable-package/test_pkg_removed_from_centos_85.py b/tests/integration/tier1/destructive/unavailable-package/test_pkg_removed_from_centos_85.py index ec2ab29998..2fab6346e8 100644 --- a/tests/integration/tier1/destructive/unavailable-package/test_pkg_removed_from_centos_85.py +++ b/tests/integration/tier1/destructive/unavailable-package/test_pkg_removed_from_centos_85.py @@ -13,11 +13,10 @@ def test_package_removed_from_centos_85(convert2rhel, shell): assert shell("rpm -qi subscription-manager-initial-setup-addon").returncode == 0 with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("Conversion successful!") diff --git a/tests/integration/tier1/destructive/yum-conf-exclude-packages/test_yum_conf_exclude_packages.py b/tests/integration/tier1/destructive/yum-conf-exclude-packages/test_yum_conf_exclude_packages.py index 9424e6a4bc..a9098c2648 100644 --- a/tests/integration/tier1/destructive/yum-conf-exclude-packages/test_yum_conf_exclude_packages.py +++ b/tests/integration/tier1/destructive/yum-conf-exclude-packages/test_yum_conf_exclude_packages.py @@ -13,11 +13,10 @@ def test_yum_conf_exclude_packages(convert2rhel, yum_conf_exclude): Reference ticket: https://issues.redhat.com/browse/RHELC-774 """ with convert2rhel( - "-y --serverurl {} --username {} --password {} --pool {} --debug".format( + "-y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: c2r.expect("IS_LOADED_KERNEL_LATEST has succeeded") diff --git a/tests/integration/tier1/non-destructive/httpd-package-transaction-error/test_httpd_package_transaction_error.py b/tests/integration/tier1/non-destructive/httpd-package-transaction-error/test_httpd_package_transaction_error.py index c6f300bd0c..da8a7b92e4 100644 --- a/tests/integration/tier1/non-destructive/httpd-package-transaction-error/test_httpd_package_transaction_error.py +++ b/tests/integration/tier1/non-destructive/httpd-package-transaction-error/test_httpd_package_transaction_error.py @@ -60,11 +60,10 @@ def test_httpd_package_transaction_error(shell, convert2rhel, handle_packages): """ # run c2r analyze to verify the yum transaction with convert2rhel( - "analyze -y --serverurl {} --username {} --password {} --pool {} --debug".format( + "analyze -y --serverurl {} --username {} --password {} --debug".format( TEST_VARS["RHSM_SERVER_URL"], - TEST_VARS["RHSM_USERNAME"], - TEST_VARS["RHSM_PASSWORD"], - TEST_VARS["RHSM_POOL"], + TEST_VARS["RHSM_SCA_USERNAME"], + TEST_VARS["RHSM_SCA_PASSWORD"], ) ) as c2r: index = c2r.expect_exact(