From ce584750b4fb89398e48462f212cceb627cd896e Mon Sep 17 00:00:00 2001 From: Lukáš Růžička Date: May 29 2020 16:25:46 +0000 Subject: Create test for IoT Greenboot. Finish test and add necessary needles. Create IOT needle directory and move needles in it. Delete needle as required by the review. Add to templates. --- diff --git a/needles/iot/iot_greenboot_passed.json b/needles/iot/iot_greenboot_passed.json new file mode 100644 index 0000000..9d166bf --- /dev/null +++ b/needles/iot/iot_greenboot_passed.json @@ -0,0 +1,22 @@ +{ + "area": [ + { + "xpos": 119, + "ypos": 97, + "width": 42, + "height": 13, + "type": "match" + }, + { + "xpos": 285, + "ypos": 95, + "width": 62, + "height": 16, + "type": "match" + } + ], + "properties": [], + "tags": [ + "iot_greenboot_passed" + ] +} \ No newline at end of file diff --git a/needles/iot/iot_greenboot_passed.png b/needles/iot/iot_greenboot_passed.png new file mode 100644 index 0000000..c7b6e59 Binary files /dev/null and b/needles/iot/iot_greenboot_passed.png differ diff --git a/templates.fif.json b/templates.fif.json index 543b0ad..d26519c 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -1492,6 +1492,19 @@ "ROOT_PASSWORD": "weakpassword" } }, + "iot_greenboot": { + "profiles": { + "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 20, + "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 20 + }, + "settings": { + "BOOTFROM": "c", + "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", + "POSTINSTALL": "iot_greenboot", + "ROOT_PASSWORD": "weakpassword", + "START_AFTER_TEST": "install_default_upload" + } + }, "mediakit_fileconflicts": { "profiles": { "fedora-Server-dvd-iso-aarch64-*-aarch64": 10, diff --git a/tests/iot_greenboot.pm b/tests/iot_greenboot.pm new file mode 100644 index 0000000..c2022ef --- /dev/null +++ b/tests/iot_greenboot.pm @@ -0,0 +1,37 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +sub run { + my $self = shift; + # switch to TTY3 for both, graphical and console tests + $self->root_console(tty=>3); + + # Use ssh to log into this machine to see its status. + type_string "ssh test\@localhost\n"; + sleep 2; + # It is very probable that this is the first time that anybody + # wants to ssh in. We need to accept the authentication. + type_string "yes\n"; + sleep 1; + # Type the user password for this connection and hopefully log in. + my $pwd = get_var("USER_PASSWORD") // "weakpassword"; + type_string "$pwd\n"; + sleep 2; + + # Check that the output is correct as expected. + assert_screen "iot_greenboot_passed"; + + # Logout from the ssh connection. + type_string "exit\n"; +} + + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: