Skip to content

Commit

Permalink
test: Add universal disk deletion function
Browse files Browse the repository at this point in the history
  • Loading branch information
skobyda committed Sep 5, 2023
1 parent 82cc1fa commit ee92f76
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/machineslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,19 @@ def run_admin(self, cmd, connectionName='system'):
else:
return m.execute(cmd)

def deleteDisk(self, target, vm_name="subVmTest1"):
b = self.browser

b.wait_visible(f"#vm-{vm_name}-disks-{target}-device")
b.wait_visible(f"#vm-{vm_name}-disks-{target}-action-kebab")
b.click(f"#vm-{vm_name}-disks-{target}-action-kebab button")
b.wait_visible(f"#delete-vm-{vm_name}-disks-{target}")
b.click(f"#delete-vm-{vm_name}-disks-{target}")
b.wait_visible(".pf-v5-c-modal-box")
b.click("#delete-resource-modal-primary")
b.wait_not_present(".pf-v5-c-modal-box")
b.wait_not_present(f"#vm-{vm_name}-disks-{target}-device")

def deleteIface(self, iface, mac=None, vm_name=None):
b = self.browser

Expand Down

0 comments on commit ee92f76

Please sign in to comment.