Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.15.z] virt-who config upgrade duplicate config issue fix #14500

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/upgrades/test_virtwho.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def form_data(target_sat):
'satellite_url': target_sat.hostname,
'hypervisor_username': esx.hypervisor_username,
'hypervisor_password': esx.hypervisor_password,
'name': 'preupgrade_virt_who',
'name': f'preupgrade_virt_who_{gen_string("alpha")}',
}


Expand Down Expand Up @@ -120,6 +120,7 @@ def test_pre_create_virt_who_configuration(
'org_id': org.id,
'org_name': org.name,
'org_label': org.label,
'name': vhd.name,
}
)

Expand All @@ -146,15 +147,16 @@ def test_post_crud_virt_who_configuration(self, form_data, pre_upgrade_data, tar
org_id = pre_upgrade_data.get('org_id')
org_name = pre_upgrade_data.get('org_name')
org_label = pre_upgrade_data.get('org_label')
name = pre_upgrade_data.get('name')

# Post upgrade, Verify virt-who exists and has same status.
vhd = target_sat.api.VirtWhoConfig(organization_id=org_id).search(
query={'search': f'name={form_data["name"]}'}
query={'search': f'name={name}'}
)[0]
if not is_open('BZ:1802395'):
assert vhd.status == 'ok'
# Verify virt-who status via CLI as we cannot check it via API now
vhd_cli = target_sat.cli.VirtWhoConfig.exists(search=('name', form_data['name']))
vhd_cli = target_sat.cli.VirtWhoConfig.exists(search=('name', name))
assert (
target_sat.cli.VirtWhoConfig.info({'id': vhd_cli['id']})['general-information'][
'status'
Expand Down Expand Up @@ -185,7 +187,7 @@ def test_post_crud_virt_who_configuration(self, form_data, pre_upgrade_data, tar
)
virt_who_instance = (
target_sat.api.VirtWhoConfig(organization_id=org_id)
.search(query={'search': f'name={form_data["name"]}'})[0]
.search(query={'search': f'name={name}'})[0]
.status
)
assert virt_who_instance == 'ok'
Expand Down
Loading