diff --git a/main.pm b/main.pm index f83c16e3..94ffffbf 100644 --- a/main.pm +++ b/main.pm @@ -57,11 +57,19 @@ else autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_empty.pm"; } + if (get_var("ENCRYPT_PASSWORD")){ + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_encrypted.pm"; + } + + # Start installation, set user & root passwords, reboot autotest::loadtest get_var('CASEDIR')."/tests/_do_install_and_reboot.pm"; } # Wait for the login screen + if (get_var("ENCRYPT_PASSWORD")){ + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_encrypted_postinstall.pm"; + } autotest::loadtest get_var('CASEDIR')."/tests/_wait_for_login_screen.pm"; if (get_var('DISK_GUIDED_MULTI')) diff --git a/needles/anaconda_install_destination_encrypt_data.json b/needles/anaconda_install_destination_encrypt_data.json new file mode 100644 index 00000000..a416bc1b --- /dev/null +++ b/needles/anaconda_install_destination_encrypt_data.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_install_destination_encrypt_data", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 20, + "ypos": 603, + "width": 121, + "height": 21, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_encrypt_data.png b/needles/anaconda_install_destination_encrypt_data.png new file mode 100644 index 00000000..9759fceb Binary files /dev/null and b/needles/anaconda_install_destination_encrypt_data.png differ diff --git a/needles/anaconda_install_destination_save_passphrase.json b/needles/anaconda_install_destination_save_passphrase.json new file mode 100644 index 00000000..3a1359f1 --- /dev/null +++ b/needles/anaconda_install_destination_save_passphrase.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 663, + "ypos": 515, + "width": 147, + "height": 42, + "type": "match" + } + ], + "tags": [ + "anaconda_install_destination_save_passphrase", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_save_passphrase.png b/needles/anaconda_install_destination_save_passphrase.png new file mode 100644 index 00000000..e51c1741 Binary files /dev/null and b/needles/anaconda_install_destination_save_passphrase.png differ diff --git a/needles/anaconda_main_hub_install_destination_already_done.json b/needles/anaconda_main_hub_install_destination_already_done.json new file mode 100644 index 00000000..294ad55b --- /dev/null +++ b/needles/anaconda_main_hub_install_destination_already_done.json @@ -0,0 +1,25 @@ +{ + "tags": [ + "anaconda_main_hub_install_destination", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 174, + "ypos": 458, + "width": 87, + "height": 79, + "type": "match" + }, + { + "xpos": 267, + "ypos": 472, + "width": 247, + "height": 30, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_main_hub_install_destination_already_done.png b/needles/anaconda_main_hub_install_destination_already_done.png new file mode 100644 index 00000000..21defbc2 Binary files /dev/null and b/needles/anaconda_main_hub_install_destination_already_done.png differ diff --git a/needles/boot_enter_passphrase.json b/needles/boot_enter_passphrase.json new file mode 100644 index 00000000..6fcd7450 --- /dev/null +++ b/needles/boot_enter_passphrase.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "boot_enter_passphrase", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 0, + "ypos": 361, + "width": 188, + "height": 31, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/boot_enter_passphrase.png b/needles/boot_enter_passphrase.png new file mode 100644 index 00000000..3025a8aa Binary files /dev/null and b/needles/boot_enter_passphrase.png differ diff --git a/tests/disk_guided_encrypted.pm b/tests/disk_guided_encrypted.pm new file mode 100644 index 00000000..fbb20528 --- /dev/null +++ b/tests/disk_guided_encrypted.pm @@ -0,0 +1,37 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + + # Default install destination (hdd should be empty for new KVM machine) + assert_and_click "anaconda_main_hub_install_destination"; + + assert_and_click "anaconda_install_destination_encrypt_data"; + assert_and_click "anaconda_spoke_done"; + + wait_idle 5; + type_string get_var("ENCRYPT_PASSWORD"); + send_key "tab"; + type_string get_var("ENCRYPT_PASSWORD"); + + assert_and_click "anaconda_install_destination_save_passphrase"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + +} + +sub test_flags { + # without anything - rollback to 'lastgood' snapshot if failed + # 'fatal' - whole test suite is in danger if this fails + # 'milestone' - after this test succeeds, update 'lastgood' + # 'important' - if this fails, set the overall state to 'fail' + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/disk_guided_encrypted_postinstall.pm b/tests/disk_guided_encrypted_postinstall.pm new file mode 100644 index 00000000..2456c371 --- /dev/null +++ b/tests/disk_guided_encrypted_postinstall.pm @@ -0,0 +1,21 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + assert_screen "boot_enter_passphrase", 300; # + type_string get_var("ENCRYPT_PASSWORD"); + send_key "ret"; +} + +sub test_flags { + # without anything - rollback to 'lastgood' snapshot if failed + # 'fatal' - whole test suite is in danger if this fails + # 'milestone' - after this test succeeds, update 'lastgood' + # 'important' - if this fails, set the overall state to 'fail' + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: