From 461b2da3bf164790f729bdeffe8a1e0d1f76ac52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ka=C5=88kovsk=C3=BD?= Date: Tue, 6 Aug 2024 10:25:18 +0200 Subject: [PATCH] Test for btrfs custom storage scenario --- test/check-storage-cockpit | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/test/check-storage-cockpit b/test/check-storage-cockpit index 39b4ea5ca..fe1d2651b 100755 --- a/test/check-storage-cockpit +++ b/test/check-storage-cockpit @@ -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__':