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

Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in UI #15288

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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