Skip to content

Commit

Permalink
tests: run one test with mount point mapping with UEFI mode
Browse files Browse the repository at this point in the history
  • Loading branch information
KKoukiou committed Jan 22, 2025
1 parent 1eef18f commit 0faf4a9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/check-storage-cockpit
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; If not, see <http://www.gnu.org/licenses/>.

from anacondalib import VirtInstallMachineCase, pixel_tests_ignore
from anacondalib import VirtInstallMachineCase, pixel_tests_ignore, run_boot
from installer import Installer
from review import Review
from storage import Storage
Expand Down Expand Up @@ -173,6 +173,7 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
checkStorageReview()

@nondestructive
@run_boot("bios", "efi")
def testBtrfsSubvolumes(self):
b = self.browser
m = self.machine
Expand All @@ -198,12 +199,17 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
self.click_dropdown(self.card_row("Storage", 1), "Create partition table")
self.confirm()

# Create EFI partition
self.click_dropdown(self.card_row("Storage", 2), "Create partition")
self.dialog({"size": 1, "type": "biosboot"})
if self.is_efi:
self.dialog({"size": 100, "type": "efi", "mount_point": "/boot/efi"})
else:
self.dialog({"size": 100, "type": "biosboot"})

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


self.click_dropdown(self.card_row("Storage", 4), "Create partition")
self.dialog({"type": "btrfs"})

Expand Down Expand Up @@ -235,12 +241,16 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
dev = "vda"
r.check_disk(dev, "16.1 GB vda (Virtio Block Device)")

if self.is_efi:
r.check_disk_row(dev, "/boot/efi", "vda1", "99.6 MB", False)
r.check_disk_row(dev, "/boot", "vda2", "1.07 GB", False)
r.check_disk_row(dev, "/", "vda3", "15.0 GB", False, None, False, 3)
r.check_disk_row(dev, "/home", "vda3", "15.0 GB", False)
r.check_disk_row(dev, "/", "vda3", "14.9 GB", False, None, False, 4 if self.is_efi else 3)
r.check_disk_row(dev, "/home", "vda3", "14.9 GB", False)

# Check fstab
fstab = m.execute("cat /etc/fstab")
if self.is_efi:
self.assertTrue("/mnt/sysroot/boot/efi auto noauto 0 0" in fstab)
self.assertTrue("/mnt/sysroot/boot auto noauto 0 0" in fstab)
self.assertTrue("/mnt/sysroot/btrfs-mount-test auto subvol=/ 0 0" in fstab)
self.assertTrue("/mnt/sysroot btrfs noauto,subvol=root 0 0" in fstab)
Expand Down

0 comments on commit 0faf4a9

Please sign in to comment.