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.14.z] add verify virt-who data is uploaded on satellite post satellite upgrade #14277

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
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
Loading