@@ -467,7 +467,6 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
467
467
b .switch_to_top ()
468
468
s .return_to_installation ("Invalid RAID configuration detected." )
469
469
470
-
471
470
@nondestructive
472
471
@disk_images ([("" , 15 ), ("" , 15 ), ("" , 15 )])
473
472
def testRAIDonDisks (self ):
@@ -510,15 +509,20 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
510
509
# Exit the cockpit-storage iframe and return to installation
511
510
b .switch_to_top ()
512
511
s .return_to_installation ()
513
- s .return_to_installation ()
512
+
513
+ with b .wait_timeout (60 ):
514
+ disk = "MDRAID-SOMERAID"
515
+ prefix = "#cockpit-storage-integration-check-storage-dialog"
516
+ r .check_disk_row (disk , "/boot" , "SOMERAID2, RAID" , "1.07 GB" , False , prefix = prefix )
517
+ r .check_disk_row (disk , "/" , "SOMERAID3, RAID" , "47.2 GB" , False , prefix = prefix )
518
+
514
519
s .return_to_installation_confirm ()
515
520
516
521
s .set_partitioning ("use-configured-storage" )
517
522
518
523
i .reach (i .steps .REVIEW )
519
524
520
525
def checkStorageReview (prefix = "" ):
521
- disk = "MDRAID-SOMERAID"
522
526
with b .wait_timeout (30 ):
523
527
r .check_disk (disk , "48.3 GB MDRAID-SOMERAID (MDRAID set (stripe))" )
524
528
r .check_disk_row (disk , "/boot" , "SOMERAID2, RAID" , "1.07 GB" , False , prefix = prefix )
@@ -527,6 +531,49 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
527
531
# verify review screen
528
532
checkStorageReview ()
529
533
534
+ @nondestructive
535
+ @disk_images ([("" , 15 ), ("" , 15 ), ("" , 15 )])
536
+ def testRAIDAutomatic (self ):
537
+ b = self .browser
538
+ m = self .machine
539
+ i = Installer (b , m )
540
+ s = Storage (b , m )
541
+ r = Review (b , m )
542
+
543
+ self .addCleanup (m .execute , "mdadm --zero-superblock /dev/vda /dev/vdb /dev/vdc" )
544
+ self .addCleanup (m .execute , "mdadm --stop /dev/md/SOMERAID" )
545
+
546
+ i .open ()
547
+ i .reach (i .steps .INSTALLATION_METHOD )
548
+ s .select_disks ([("vdb" , True ), ("vda" , True ), ("vdc" , True )])
549
+
550
+ s .modify_storage ()
551
+ s .confirm_entering_cockpit_storage ()
552
+ b .switch_to_frame ("cockpit-storage" )
553
+
554
+ # Create RAID device on vda, vdb, and vdc
555
+ self .click_dropdown (self .card_header ("Storage" ), "Create MDRAID device" )
556
+ self .dialog_wait_open ()
557
+ self .dialog_set_val ("level" , "raid0" )
558
+ self .dialog_set_val ("disks" , {"vda" : True , "vdb" : True , "vdc" : True })
559
+ self .dialog_set_val ("name" , "SOMERAID" )
560
+ self .dialog_apply ()
561
+ self .dialog_wait_close ()
562
+
563
+ # Exit the cockpit-storage iframe and return to installation
564
+ b .switch_to_top ()
565
+ s .return_to_installation ()
566
+ s .return_to_installation_confirm ()
567
+
568
+ s .check_partitioning_selected ("erase-all" )
569
+ i .reach (i .steps .REVIEW )
570
+
571
+ disk = "MDRAID-SOMERAID"
572
+ with b .wait_timeout (30 ):
573
+ r .check_disk (disk , "48.3 GB MDRAID-SOMERAID (MDRAID set (stripe))" )
574
+ r .check_disk_row (disk , "/boot" , "SOMERAID2, RAID" , "1.07 GB" , True , "xfs" )
575
+ r .check_disk_row (disk , "/" , "SOMERAID3, LVM" , "16.1 GB" , True , "xfs" )
576
+
530
577
531
578
if __name__ == '__main__' :
532
579
test_main ()
0 commit comments