diff --git a/robottelo/utils/virtwho.py b/robottelo/utils/virtwho.py index 27968c4d37a..c20d39ff6db 100644 --- a/robottelo/utils/virtwho.py +++ b/robottelo/utils/virtwho.py @@ -592,20 +592,7 @@ def vw_fake_conf_create( rhsm_encrypted_password = f'rhsm_encrypted_password={rhsm_encrypted_password}\n' rhsm_prefix = 'rhsm_prefix=/rhsm\n' rhsm_port = 'rhsm_port=443\n' - cmd = ('cat < {}' '{}' '{}' '{}' '{}' '{}' '{}' '{}' '{}' '{}' '{}' '{}' 'EOF').format( - file, - title, - type, - json, - is_hypervisor, - owner, - env, - rhsm_hostname, - rhsm_username, - rhsm_encrypted_password, - rhsm_prefix, - rhsm_port, - ) + cmd = f'cat < {file}\n{title}\n{type}\n{json}\n{is_hypervisor}\n{owner}\n{env}\n{rhsm_hostname}\n{rhsm_username}\n{rhsm_encrypted_password}\n{rhsm_prefix}\n{rhsm_port}\nEOF' runcmd(cmd) diff --git a/tests/foreman/virtwho/cli/test_esx_sca.py b/tests/foreman/virtwho/cli/test_esx_sca.py index 9f3fabe2033..6b397d16946 100644 --- a/tests/foreman/virtwho/cli/test_esx_sca.py +++ b/tests/foreman/virtwho/cli/test_esx_sca.py @@ -527,9 +527,9 @@ def test_positive_post_hypervisors_with_fake_different_org_simultaneous( :BZ: 2173870 """ - # create 3 hypersiors and each have 3 guests json file + # create json file for 3 hyperviors, each with 3 guests json_file = Path("/tmp/fake.json") - data = hypervisor_fake_json_create(hypervisors=1, guests=1) + data = hypervisor_fake_json_create(hypervisors=3, guests=3) json_file.write_text(json.dumps(data)) # create 10 fake files in module_sca_manifest_org virtwho_config_cli = target_sat.cli.VirtWhoConfig.create(form_data_cli)[ @@ -581,6 +581,7 @@ def test_positive_post_hypervisors_with_fake_different_org_simultaneous( fake_conf_file, json_file, ) + # run virt-who with option -d, --debug and -o, --one-shot vw_run_option("od") for i in range(10): fake_conf_file = f"/etc/virt-who.d/virt-who-config-fake{i}.conf"