#353 Add initial webUI custom install tests (xfs, ext4)
Merged 15 days ago by adamwill. Opened a month ago by adamwill.

file modified
+7 -1
@@ -147,7 +147,13 @@ 

  # custom_blivet_add_partition

  for dtype in ("lvmvg", "lvmlv", "lvmthin", "raid"):

      testtags.append(f"anaconda_blivet_part_devicetype_{dtype}")

- for fsys in ("ext4", "xfs", "btrfs", "ppc_prep_boot", "swap", "efi_filesystem", "biosboot"):

+ # these are in webui already...

+ for fsys in ("ext4", "xfs", "efi_filesystem", "biosboot"):

+     testtags.append(f"anaconda_blivet_part_fs_{fsys}")

+     testtags.append(f"anaconda_blivet_part_fs_{fsys}_selected")

+     testtags.append(f"anaconda_webui_custom_fs_{fsys}")

+ # ...these aren't yet

+ for fsys in ("btrfs", "ppc_prep_boot", "swap"):

      testtags.append(f"anaconda_blivet_part_fs_{fsys}")

      testtags.append(f"anaconda_blivet_part_fs_{fsys}_selected")

  # this is variable-y in custom_blivet_resize_partition but we only

file modified
+71 -1
@@ -9,7 +9,7 @@ 

  use utils;

  use bugzilla;

  

- our @EXPORT = qw/select_disks custom_scheme_select custom_blivet_add_partition custom_blivet_format_partition custom_blivet_resize_partition custom_change_type custom_change_fs custom_change_device custom_delete_part get_full_repo get_mirrorlist_url crash_anaconda_text report_bug_text/;

+ our @EXPORT = qw/select_disks custom_scheme_select custom_blivet_add_partition custom_blivet_format_partition custom_blivet_resize_partition custom_change_type custom_change_fs custom_change_device custom_delete_part webui_custom_start webui_custom_create_disklabel webui_custom_add_partition webui_custom_boot_partitions get_full_repo get_mirrorlist_url crash_anaconda_text report_bug_text/;

  

  sub select_disks {

      # Handles disk selection. Has one optional argument - number of
@@ -308,6 +308,76 @@ 

      assert_and_click "anaconda_part_delete";

  }

  

+ sub webui_custom_start {

+     # enter webui's custom partitioning flow

+     assert_and_click "anaconda_webui_kebab_blue";

+     assert_and_click "anaconda_webui_storage_editor";

+     assert_and_click "anaconda_webui_storage_editor_confirm";

+ }

+ 

+ sub webui_custom_create_disklabel {

+     # create partition table on a blank disk

+     assert_and_click "anaconda_webui_custom_unformatted";

+     assert_and_click "anaconda_webui_custom_create_table";

+     assert_and_click "anaconda_webui_custom_initialize";

+ }

+ 

+ sub webui_custom_add_partition {

+     # create a new partition in webui's custom interface

+     my %args = (

+         devicetype => "",

+         size => 0,

+         filesystem => "",

+         mountpoint => "",

+         @_

+     );

+     my $pname = "";

+     if ($args{mountpoint}) {

+         $pname = $args{mountpoint};

+         $pname =~ s,/,,g;

+     }

+     assert_and_click "anaconda_webui_custom_freespace";

+     assert_and_click "anaconda_webui_custom_create_partition";

+     assert_screen "anaconda_webui_custom_partition_creation";

+     type_very_safely $pname if ($args{mountpoint});

+     send_key 'tab';

+     type_very_safely $args{mountpoint} if ($args{mountpoint});

+     send_key 'tab';

+     if ($args{filesystem}) {

+         assert_and_click "anaconda_webui_active_downcaret";

+         assert_and_click "anaconda_webui_custom_fs_$args{filesystem}";

+     }

+     wait_still_screen 2;

+     send_key 'tab';

+     wait_still_screen 2;

+     send_key 'tab';

+     wait_still_screen 2;

+     type_very_safely $args{size} if ($args{size});

+     send_key 'tab';

+     # select MB (size should always be in MB)

+     send_key 'up' if ($args{size});

+     wait_still_screen 2;

+     assert_and_click "anaconda_webui_custom_create";

+     wait_still_screen 5;

+ }

+ 

+ sub webui_custom_boot_partitions {

+     # standard steps to create /boot/efi, /boot, bios boot, PRePboot etc.

+     if (get_var("UEFI")) {

+         # if we're running on UEFI, we need esp

+         webui_custom_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');

+     }

+     elsif (get_var("OFW")) {

+         webui_custom_add_partition(size => 4, filesystem => 'ppc_prep_boot');

+     }

+     else {

+         # from anaconda-37.12.1 onwards, GPT is default for BIOS

+         # installs, so we need a biosboot partition

+         webui_custom_add_partition(size => 1, filesystem => 'biosboot');

+     }

+     webui_custom_add_partition(size => 512, mountpoint => '/boot');

+ }

+ 

  sub get_full_repo {

      my ($repourl) = @_;

      # trivial thing we kept repeating: fill out an HTTP or HTTPS

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 677,

+       "ypos": 323,

+       "width": 21,

+       "height": 46,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_active_downcaret"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,17 @@ 

+ {

+   "area": [

+     {

+       "ypos": 727,

+       "height": 17,

+       "xpos": 364,

+       "width": 43,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "ENV-DISTRI-fedora",

+     "LANGUAGE-english",

+     "anaconda_webui_begin_installation"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,26 @@ 

+ {

+     "area": [

+         {

+             "height": 17,

+             "type": "match",

+             "click_point": {

+                 "xpos": 33,

+                 "ypos": 8

+             },

+             "width": 66,

+             "xpos": 272,

+             "ypos": 315

+         },

+         {

+             "height": 20,

+             "type": "match",

+             "width": 40,

+             "xpos": 560,

+             "ypos": 255

+         }

+     ],

+     "properties": [],

+     "tags": [

+         "anaconda_webui_continue"

+     ]

+ }

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 90,

+       "ypos": 511,

+       "width": 53,

+       "height": 16,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_create"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 589,

+       "ypos": 393,

+       "width": 51,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_create_partition"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 550,

+       "ypos": 409,

+       "width": 51,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_create_table"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,19 @@ 

+ {

+   "area": [

+     {

+       "xpos": 51,

+       "ypos": 339,

+       "width": 651,

+       "height": 29,

+       "type": "match",

+       "click_point": {

+         "xpos": 645.5,

+         "ypos": 14.5

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_freespace"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,19 @@ 

+ {

+   "area": [

+     {

+       "xpos": 53,

+       "ypos": 447,

+       "width": 653,

+       "height": 29,

+       "type": "match",

+       "click_point": {

+         "xpos": 641.5,

+         "ypos": 17.5

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_freespace"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 241,

+       "ypos": 541,

+       "width": 35,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_fs_biosboot"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 239,

+       "ypos": 540,

+       "width": 79,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_fs_efi_filesystem"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 240,

+       "ypos": 401,

+       "width": 38,

+       "height": 16,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_fs_ext4"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 240,

+       "ypos": 372,

+       "width": 28,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_fs_xfs"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 91,

+       "ypos": 327,

+       "width": 59,

+       "height": 15,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_initialize"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 94,

+       "ypos": 161,

+       "width": 176,

+       "height": 31,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_partition_creation"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 56,

+       "ypos": 694,

+       "width": 17,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_return"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,19 @@ 

+ {

+   "area": [

+     {

+       "xpos": 53,

+       "ypos": 252,

+       "width": 668,

+       "height": 38,

+       "type": "match",

+       "click_point": {

+         "xpos": 642,

+         "ypos": 1

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_custom_unformatted"

+   ]

+ }

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 973,

+       "ypos": 52,

+       "width": 21,

+       "height": 28,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_kebab_blue"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 834,

+       "ypos": 105,

+       "width": 160,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_storage_editor"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 272,

+       "ypos": 486,

+       "width": 159,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_webui_storage_editor_confirm"

+   ]

+ } 

\ No newline at end of file

file modified
+22
@@ -2305,6 +2305,28 @@ 

                  "WORKER_CLASS": "tap"

              }

          },

+         "install_webui_ext4": {

+             "profiles": {

+                 "fedora-Workstation-live-iso-x86_64-*-64bit": 10,

+                 "fedora-Workstation-live-iso-x86_64-*-bios": 11

+             },

+             "settings": {

+                 "PARTITIONING": "webui_ext4",

+                 "POSTINSTALL": "disk_custom_blivet_standard_partition_ext4_postinstall",

+                 "ROOT_PASSWORD": "weakpassword"

+             }

+         },

+         "install_webui_xfs": {

+             "profiles": {

+                 "fedora-Workstation-live-iso-x86_64-*-64bit": 10,

+                 "fedora-Workstation-live-iso-x86_64-*-bios": 11

+             },

+             "settings": {

+                 "PARTITIONING": "webui_xfs",

+                 "POSTINSTALL": "disk_custom_xfs_postinstall",

+                 "ROOT_PASSWORD": "weakpassword"

+             }

+         },

          "install_xfs": {

              "profiles": {

                  "fedora-Server-dvd-iso-aarch64-*-aarch64": 40,

@@ -3,6 +3,8 @@ 

  use testapi;

  

  sub run {

+     my $self = shift;

+     $self->root_console(tty => 3, timeout => 30);

      assert_screen "root_console";

      # check number of partitions

      script_run 'fdisk -l | grep /dev/vda';    # debug

@@ -3,7 +3,8 @@ 

  use testapi;

  

  sub run {

-     assert_screen "root_console";

+     my $self = shift;

+     $self->root_console(tty => 3, timeout => 30);

      # check that xfs is used on root partition

      assert_script_run "mount | grep 'on / type xfs'";

  }

@@ -0,0 +1,26 @@ 

+ use base "anacondatest";

+ use strict;

+ use testapi;

+ use anaconda;

+ 

+ sub run {

+     my $self = shift;

+     webui_custom_start;

+     webui_custom_create_disklabel;

+     webui_custom_boot_partitions;

+ 

+     webui_custom_add_partition(filesystem => 'ext4', mountpoint => '/');

+ 

+     assert_and_click "anaconda_webui_custom_return";

+     assert_and_click "anaconda_webui_continue";

+     assert_screen "anaconda_webui_installmethod";

+     assert_and_click "anaconda_webui_next";

+ }

+ 

+ sub test_flags {

+     return {fatal => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,26 @@ 

+ use base "anacondatest";

+ use strict;

+ use testapi;

+ use anaconda;

+ 

+ sub run {

+     my $self = shift;

+     webui_custom_start;

+     webui_custom_create_disklabel;

+     webui_custom_boot_partitions;

+ 

+     webui_custom_add_partition(filesystem => 'xfs', mountpoint => '/');

+ 

+     assert_and_click "anaconda_webui_custom_return";

+     assert_and_click "anaconda_webui_continue";

+     assert_screen "anaconda_webui_installmethod";

+     assert_and_click "anaconda_webui_next";

+ }

+ 

+ sub test_flags {

+     return {fatal => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

This adds two initial custom layout install tests for webUI, and
wires up some library functions for other tests to use. They may
need refining over time but this should be good enough for a
start.

Signed-off-by: Adam Williamson awilliam@redhat.com

rebased onto af1a85e

a month ago

rebased onto af1a85e

a month ago

rebased onto 256731a

a month ago

Sorry, about not seeing this. I will take a close look tomorrow.

Right. So we are creating a dedicated set of tests with common functions in the library. I like this.

rebased onto f8e7276

a month ago

The PR also adds the install_webui_xfs, but the disk_webui_ext4.pm seems to be missing, so the ext4 test is failing of course.

The PR also adds the install_webui_xfs, but the disk_webui_ext4.pm seems to be missing, so the ext4 test is failing of course.

It should be install_webui_ext4.

The XFS version of the test works flawlessly.

1 new commit added

  • Add the missing test for ext4 partitioning.
a month ago

I added the ext4 version by editting the xfs test file. You can use it, if it is ok with you.

2 new commits added

  • Add the missing test for ext4 partitioning.
  • Add initial webUI custom install tests (xfs, ext4)
a month ago

Oh. Please don't do that. I already had it, it just needed to be git added.

I've pushed my branch back to origin, will fix up any failures.

rebased onto f8e7276

a month ago

rebased onto f8e7276

a month ago

rebased onto f8e7276

a month ago

rebased onto 077d318

a month ago

rebased onto 077d318

a month ago

rebased onto 5aad236

a month ago

Oh. Please don't do that. I already had it, it just needed to be git added.

Sorry, i just wanted to help.

rebased onto 2415f76

a month ago

rebased onto 45728be

a month ago

rebased onto e9e12b5

a month ago

rebased onto 10f53ea

24 days ago

rebased onto 10f53ea

21 days ago

@lruzicka so I think the occasional failures here were a timing issue - the "confirm" dialog was initially being drawn with no details, openQA matched where the button was, then the details got added while openQA was going to click the button, so the button moved, and it "missed".

I've added some wait_still_screens to avoid this kinda thing happening at a few points, let's see if it's more robust now.

rebased onto c9408e2

21 days ago

rebased onto c9408e2

19 days ago

rebased onto 2229d0e

19 days ago

rebased onto f473de3

18 days ago

rebased onto f473de3

18 days ago

rebased onto bd687aa

18 days ago

The tests worked just fine on my installation. Did not experience any problems with them.

yeah, I had to fiddle with it a couple of times but I think I got a reliable version now. will watch for a day or two on stg then merge.

rebased onto a9397e2

16 days ago

rebased onto a9397e2

16 days ago

rebased onto a9397e2

16 days ago

Pull-Request has been merged by adamwill

15 days ago
Metadata
Changes Summary 45
+7 -1
file changed
check-needles.py
+71 -1
file changed
lib/anaconda.pm
+15
file added
needles/anaconda/webui/webui_active_downcaret-20250110.json
+0
file added
needles/anaconda/webui/webui_active_downcaret-20250110.png
+17
file added
needles/anaconda/webui/webui_begin_installation-noerase-20250110.json
+0
file added
needles/anaconda/webui/webui_begin_installation-noerase-20250110.png
+26
file added
needles/anaconda/webui/webui_continue-20250110.json
+0
file added
needles/anaconda/webui/webui_continue-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_create-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_create-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_create_partition-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_create_partition-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_create_table-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_create_table-20250110.png
+19
file added
needles/anaconda/webui/webui_custom_freespace-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_freespace-20250110.png
+19
file added
needles/anaconda/webui/webui_custom_freespace-active-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_freespace-active-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_fs_biosboot-20250111.json
+0
file added
needles/anaconda/webui/webui_custom_fs_biosboot-20250111.png
+15
file added
needles/anaconda/webui/webui_custom_fs_efi_filesystem-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_fs_efi_filesystem-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_fs_ext4-selected-20250116.json
+0
file added
needles/anaconda/webui/webui_custom_fs_ext4-selected-20250116.png
+15
file added
needles/anaconda/webui/webui_custom_fs_xfs-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_fs_xfs-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_initialize-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_initialize-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_partition_creation-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_partition_creation-20250110.png
+15
file added
needles/anaconda/webui/webui_custom_return-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_return-20250110.png
+19
file added
needles/anaconda/webui/webui_custom_unformatted-20250110.json
+0
file added
needles/anaconda/webui/webui_custom_unformatted-20250110.png
+15
file added
needles/anaconda/webui/webui_kebab_blue-20250108.json
+0
file added
needles/anaconda/webui/webui_kebab_blue-20250108.png
+15
file added
needles/anaconda/webui/webui_storage_editor-20250109.json
+0
file added
needles/anaconda/webui/webui_storage_editor-20250109.png
+15
file added
needles/anaconda/webui/webui_storage_editor_confirm-20250109.json
+0
file added
needles/anaconda/webui/webui_storage_editor_confirm-20250109.png
+22 -0
file changed
templates.fif.json
+2 -0
file changed
tests/disk_custom_blivet_standard_partition_ext4_postinstall.pm
+2 -1
file changed
tests/disk_custom_xfs_postinstall.pm
+26
file added
tests/disk_webui_ext4.pm
+26
file added
tests/disk_webui_xfs.pm