Skip to content

Commit

Permalink
Check Hypervisor host subscription status and hypervisor host and vir…
Browse files Browse the repository at this point in the history
…tual guest mapping in UI
  • Loading branch information
yanpliu committed Jun 4, 2024
1 parent 65b7d28 commit 81e8ee8
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 10 deletions.
40 changes: 38 additions & 2 deletions tests/foreman/virtwho/ui/test_esx_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ def test_positive_deploy_configure_by_id_script(
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted
5. Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
6. Config can be deleted
:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
# Check virt-who config status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
Expand All @@ -69,6 +70,41 @@ def test_positive_deploy_configure_by_id_script(
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
hypervisorhost_new_overview = org_session.host_new.get_details(
hypervisor_display_name, 'overview'
)
assert hypervisorhost_new_overview['overview']['host_status']['status_success'] == '2'
# hypervisor host Check details
hypervisorhost_new_detais = org_session.host_new.get_details(
hypervisor_display_name, 'details'
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)
# Check guest overview
guest_new_overview = org_session.host_new.get_details(guest_name, 'overview')
assert guest_new_overview['overview']['host_status']['status_success'] == '2'
# Check guest details
virtualguest_new_detais = org_session.host_new.get_details(guest_name, 'details')
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)

@pytest.mark.tier2
def test_positive_debug_option(
self, module_sca_manifest_org, virtwho_config_ui, org_session, form_data_ui
Expand Down
40 changes: 38 additions & 2 deletions tests/foreman/virtwho/ui/test_hyperv_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ def test_positive_deploy_configure_by_id_script(
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted
5. Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
6. Config can be deleted
:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
# Check virt-who config status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
Expand All @@ -54,6 +55,41 @@ def test_positive_deploy_configure_by_id_script(
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
hypervisorhost_new_overview = org_session.host_new.get_details(
hypervisor_display_name, 'overview'
)
assert hypervisorhost_new_overview['overview']['host_status']['status_success'] == '2'
# hypervisor host Check details
hypervisorhost_new_detais = org_session.host_new.get_details(
hypervisor_display_name, 'details'
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)
# Check guest overview
guest_new_overview = org_session.host_new.get_details(guest_name, 'overview')
assert guest_new_overview['overview']['host_status']['status_success'] == '2'
# Check guest details
virtualguest_new_detais = org_session.host_new.get_details(guest_name, 'details')
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
self, module_sca_manifest_org, virtwho_config_ui, org_session, form_data_ui
Expand Down
40 changes: 38 additions & 2 deletions tests/foreman/virtwho/ui/test_kubevirt_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ def test_positive_deploy_configure_by_id_script(
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted
5. Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
6. Config can be deleted
:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
# Check virt-who config status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
Expand All @@ -54,6 +55,41 @@ def test_positive_deploy_configure_by_id_script(
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
hypervisorhost_new_overview = org_session.host_new.get_details(
hypervisor_display_name, 'overview'
)
assert hypervisorhost_new_overview['overview']['host_status']['status_success'] == '2'
# hypervisor host Check details
hypervisorhost_new_detais = org_session.host_new.get_details(
hypervisor_display_name, 'details'
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)
# Check guest overview
guest_new_overview = org_session.host_new.get_details(guest_name, 'overview')
assert guest_new_overview['overview']['host_status']['status_success'] == '2'
# Check guest details
virtualguest_new_detais = org_session.host_new.get_details(guest_name, 'details')
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
self, module_sca_manifest_org, virtwho_config_ui, org_session, form_data_ui
Expand Down
40 changes: 38 additions & 2 deletions tests/foreman/virtwho/ui/test_libvirt_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ def test_positive_deploy_configure_by_id_script(
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted
5. Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
6. Config can be deleted
:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
# Check virt-who config status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
Expand All @@ -54,6 +55,41 @@ def test_positive_deploy_configure_by_id_script(
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
hypervisorhost_new_overview = org_session.host_new.get_details(
hypervisor_display_name, 'overview'
)
assert hypervisorhost_new_overview['overview']['host_status']['status_success'] == '2'
# hypervisor host Check details
hypervisorhost_new_detais = org_session.host_new.get_details(
hypervisor_display_name, 'details'
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)
# Check guest overview
guest_new_overview = org_session.host_new.get_details(guest_name, 'overview')
assert guest_new_overview['overview']['host_status']['status_success'] == '2'
# Check guest details
virtualguest_new_detais = org_session.host_new.get_details(guest_name, 'details')
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
self, module_sca_manifest_org, virtwho_config_ui, org_session, form_data_ui
Expand Down
40 changes: 38 additions & 2 deletions tests/foreman/virtwho/ui/test_nutanix_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ def test_positive_deploy_configure_by_id_script(
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted
5. Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
6. Config can be deleted
:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
# Check virt-who config status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
Expand All @@ -58,6 +59,41 @@ def test_positive_deploy_configure_by_id_script(
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI
hypervisorhost_new_overview = org_session.host_new.get_details(
hypervisor_display_name, 'overview'
)
assert hypervisorhost_new_overview['overview']['host_status']['status_success'] == '2'
# hypervisor host Check details
hypervisorhost_new_detais = org_session.host_new.get_details(
hypervisor_display_name, 'details'
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
hypervisorhost_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)
# Check guest overview
guest_new_overview = org_session.host_new.get_details(guest_name, 'overview')
assert guest_new_overview['overview']['host_status']['status_success'] == '2'
# Check guest details
virtualguest_new_detais = org_session.host_new.get_details(guest_name, 'details')
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties'][
'virtual_host'
]
== hypervisor_display_name
)
assert (
virtualguest_new_detais['details']['system_properties']['sys_properties']['name']
== guest_name
)

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
self, module_sca_manifest_org, virtwho_config_ui, org_session, form_data_ui
Expand Down

0 comments on commit 81e8ee8

Please sign in to comment.