Skip to content

Commit

Permalink
Add check to validate if vTPM device is added to VM on VMware
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Talreja <[email protected]>
  • Loading branch information
Gauravtalreja1 committed Jan 28, 2025
1 parent ae3167b commit 1d5c6ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions tests/foreman/api/test_computeresource_vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_positive_provision_end_to_end(
:CaseImportance: Critical
:Verifies: SAT-18721, SAT-23558, SAT-25810
:Verifies: SAT-18721, SAT-23558, SAT-25810, SAT-25339
:customerscenario: true
Expand Down Expand Up @@ -128,9 +128,15 @@ def test_positive_provision_end_to_end(

request.addfinalizer(lambda: sat.provisioning_cleanup(host.name))
assert host.name == f'{name}.{module_provisioning_sat.domain.name}'
# check if vm is created on vmware
# Check if VM is created on VMware
assert vmwareclient.does_vm_exist(host.name) is True
# check the build status

# Check if virtual TPM device is added to created VM (only for UEFI)
if pxe_loader.vm_firmware != 'bios':
vm = vmwareclient.get_vm(host.name)
assert 'VirtualTPM' in vm.get_virtual_device_type_names()

# Check the build status
wait_for(
lambda: host.read().build_status_label != 'Pending installation',
timeout=1500,
Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/ui/test_computeresource_vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ def test_positive_provision_end_to_end(
"""
SELECTED_ROLE = 'theforeman.foreman_scap_client'
host_name = gen_string('alpha').lower()
guest_os_names = 'Red Hat Enterprise Linux 9 (64 bit)'
guest_os_names = 'Red Hat Enterprise Linux 8 (64 bit)'
storage_data = {'storage': {'disks': [{'data_store': get_vmware_datastore_summary_string}]}}
network_data = {
'network_interfaces': {
Expand Down

0 comments on commit 1d5c6ea

Please sign in to comment.