Skip to content

Commit

Permalink
Test for btrfs custom storage scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkankovsky committed Aug 6, 2024
1 parent 4aa3bf0 commit 461b2da
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions test/check-storage-cockpit
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,58 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
self.assertTrue("/mnt/sysroot btrfs noauto,subvol=root 0 0" in fstab)
self.assertTrue("/mnt/sysroot/home btrfs noauto,subvol=home 0 0" in fstab)

@nondestructive
def testBtrfsAndConfigureedStorage(self):
b = self.browser
m = self.machine
i = Installer(b, m, scenario="use-configured-storage")
s = Storage(b, m)
r = Review(b, m)

i.open()
i.reach(i.steps.INSTALLATION_METHOD)
s.wait_scenario_visible("use-configured-storage", False)
s.check_single_disk_destination("vda")
s.modify_storage()
s.confirm_entering_cockpit_storage()
b.wait_visible(".cockpit-storage-integration-sidebar")

frame = "iframe[name='cockpit-storage']"
b._wait_present(frame)
b.switch_to_frame("cockpit-storage")
b._wait_present("#storage.ct-page-fill")

# Create GPT partition table
self.click_dropdown(self.card_row("Storage", 1), "Create partition table")
self.confirm()

# Create BIOS boot partition
self.click_dropdown(self.card_row("Storage", 2), "Create partition")
self.dialog({"size": 1, "type": "biosboot"})

# Create ext4 partition for /boot
self.click_dropdown(self.card_row("Storage", 3), "Create partition")
self.dialog({"size": 1070, "type": "ext4", "mount_point": "/boot"})

# Create Btrfs partition for /
self.click_dropdown(self.card_row("Storage", 4), "Create partition")
self.dialog({"type": "btrfs", "mount_point": "/"})

# Exit the cockpit-storage iframe
b.switch_to_top()

s.return_to_installation()
s.return_to_installation_confirm()

s.set_partitioning("use-configured-storage")

i.reach(i.steps.REVIEW)

# verify review screen
dev = "vda"
r.check_disk(dev, "16.1 GB vda (0x1af4)")

i.begin_installation(button_text="Install")


if __name__ == '__main__':
Expand Down

0 comments on commit 461b2da

Please sign in to comment.