Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webui: tests: make some more tests non-destructive #4940

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/webui/src/components/storage/CustomMountPoint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const CustomMountPoint = ({ deviceData, diskSelection, partitioningData,

// If device selection changed since the last partitioning request redo the partitioning
const selectedDevicesPaths = diskSelection.selectedDisks.map(d => deviceData[d].path.v) || [];
const partitioningDevicesPaths = partitioningData?.requests.map(r => r["device-spec"]) || [];
const partitioningDevicesPaths = partitioningData?.requests?.map(r => r["device-spec"]) || [];
const canReusePartitioning = selectedDevicesPaths.length === partitioningDevicesPaths.length && selectedDevicesPaths.every(d => partitioningDevicesPaths.includes(d));

useEffect(() => {
Expand Down
12 changes: 9 additions & 3 deletions ui/webui/test/check-storage
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,16 @@ class TestStorageMountPoints(anacondalib.VirtInstallMachineCase):
udevadm settle --timeout=120
""")

@nondestructive
def testBasic(self):
b = self.browser
m = self.machine
i = Installer(b, m)
s = Storage(b, m)
r = Review(b)

self.addCleanup(m.execute, "wipefs --all /dev/vda")

disk = "/dev/vda"
m.execute(f"""
sgdisk --zap-all {disk}
Expand All @@ -438,8 +441,8 @@ class TestStorageMountPoints(anacondalib.VirtInstallMachineCase):
sgdisk --new=0:0:+10GiB {disk}
sgdisk --new=0:0:0 {disk}
mkfs.ext4 {disk}2
KKoukiou marked this conversation as resolved.
Show resolved Hide resolved
mkfs.xfs {disk}3
mkfs.btrfs {disk}4
mkfs.xfs -f {disk}3
mkfs.btrfs -f {disk}4
""")

self.udevadm_settle()
Expand Down Expand Up @@ -500,12 +503,15 @@ class TestStorageMountPoints(anacondalib.VirtInstallMachineCase):
r.check_disk_row(disk, row, "Format type", "btrfs")
r.check_disk_row(disk, row, "Mount point", "/")

@nondestructive
def testNoRootMountPoint(self):
b = self.browser
m = self.machine
i = Installer(b, m)
s = Storage(b, m)

self.addCleanup(m.execute, "wipefs --all /dev/vda")

# BIOS boot /boot on ext4 / on xfs /home on btrfs
disk = "/dev/vda"
m.execute(f"""
Expand All @@ -515,7 +521,7 @@ class TestStorageMountPoints(anacondalib.VirtInstallMachineCase):
sgdisk --new=0:0:+10GiB {disk}
sgdisk --new=0:0:0 {disk}
mkfs.ext4 {disk}2
mkfs.xfs {disk}3
mkfs.xfs -f {disk}3
mkfs.ext4 {disk}4
""")

Expand Down