Skip to content

Commit

Permalink
[6.15.z] add verify virt-who data is uploaded on satellite post satel…
Browse files Browse the repository at this point in the history
…lite upgrade (SatelliteQE#14278)

add verify virt-who data is uploaded on satellite post satellite upgrade (SatelliteQE#14260)

(cherry picked from commit d7b6d8b)

Co-authored-by: yanpliu <[email protected]>
  • Loading branch information
Satellite-QE and yanpliu authored Mar 7, 2024
1 parent d0322d3 commit 9bf6fd6
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests/upgrades/test_virtwho.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def test_pre_create_virt_who_configuration(
'hypervisor_name': hypervisor_name,
'guest_name': guest_name,
'org_id': org.id,
'org_name': org.name,
'org_label': org.label,
}
)

Expand All @@ -131,15 +133,19 @@ def test_post_crud_virt_who_configuration(self, form_data, pre_upgrade_data, tar
1. Post upgrade, Verify virt-who exists and has same status.
2. Verify the connection of the guest on Content host.
3. Verify the virt-who config-file exists.
4. Update virt-who config with new name.
5. Delete virt-who config.
4. Verify Report is sent to satellite.
5. Update virt-who config with new name.
6. Delete virt-who config.
:expectedresults:
1. virt-who config is intact post upgrade.
2. the config and guest connection have the same status.
3. virt-who config should update and delete successfully.
3. Report is sent to satellite.
4. virt-who config should update and delete successfully.
"""
org_id = pre_upgrade_data.get('org_id')
org_name = pre_upgrade_data.get('org_name')
org_label = pre_upgrade_data.get('org_label')

# Post upgrade, Verify virt-who exists and has same status.
vhd = target_sat.api.VirtWhoConfig(organization_id=org_id).search(
Expand Down Expand Up @@ -172,6 +178,18 @@ def test_post_crud_virt_who_configuration(self, form_data, pre_upgrade_data, tar
config_file = get_configure_file(vhd.id)
get_configure_option('hypervisor_id', config_file),

# Verify Report is sent to satellite.
command = get_configure_command(vhd.id, org=org_name)
deploy_configure_by_command(
command, form_data['hypervisor_type'], debug=True, org=org_label
)
virt_who_instance = (
target_sat.api.VirtWhoConfig(organization_id=org_id)
.search(query={'search': f'name={form_data["name"]}'})[0]
.status
)
assert virt_who_instance == 'ok'

# Update virt-who config
modify_name = gen_string('alpha')
vhd.name = modify_name
Expand Down

0 comments on commit 9bf6fd6

Please sign in to comment.