From ce584750b4fb89398e48462f212cceb627cd896e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20R=C5=AF=C5=BEi=C4=8Dka?= Date: Wed, 27 May 2020 14:49:22 +0200 Subject: [PATCH] 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. --- needles/iot/iot_greenboot_passed.json | 22 +++++++++++++++ needles/iot/iot_greenboot_passed.png | Bin 0 -> 2591 bytes templates.fif.json | 13 +++++++++ tests/iot_greenboot.pm | 37 ++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 needles/iot/iot_greenboot_passed.json create mode 100644 needles/iot/iot_greenboot_passed.png create mode 100644 tests/iot_greenboot.pm diff --git a/needles/iot/iot_greenboot_passed.json b/needles/iot/iot_greenboot_passed.json new file mode 100644 index 00000000..9d166bf3 --- /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 0000000000000000000000000000000000000000..c7b6e59d5949324b4c7ba1d303ea0fd02c1fcab9 GIT binary patch literal 2591 zcmd6p=U0=762{*Y0ttZ-6sf_0>jF{~DI!t=1Su<0q=X<<=>|e?A}^3NS&G13QPx6L z385&41f)djE=v(a=`Acv5v3_Cb>ZUuEAD)l=XuVV^E+og&HQ3_)j|X%g8~3R#LANB z008hK3j-jqBLO4nSC0f?cg4~CNLeh_u^UNW008;XifG~(JGMMgoi^Kf0>Lj3k&{So zJC+xBH!Y)X(L2rWVq_snSx;MbGG?S!g-k8>X?r|^#>HK;_({+-5%#9kclFCeOGv}k z`9n!`xcBeI;boEa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rvw2Y3T zsE){A(sBCI<1G13l$Pb8rF^oY)y^N`+2sk^IG7X`|-o!Y~YVQgla$;E3;GE=ZfpY)0P3rvHB zDppk_V&ar(4N3fmnTUv_!%On~5-Z1>xClD`;xwJw0i=_B%J34`uZ08o-N*3@qQZR_ z)layf`PJ>>ct}-D3>(OL6cI6Zb&+@XWq14%jKvadZt5f#EmaLSp#|9zw+5@oW|ZyW zm2+aQZZD&mF@Bfw+{5sS#fGnlIyN?q1~%*kzidF0hVpaa9SqC}!c#ugB9Z{A1;=!b zbh^$n7_N^5gzo&*EDZi!QvTe{@@e&2M=mTT47=Rcreu(@ zeN&3kXr*wjT+eu32{Bjh8WOsFN|8EnRci3k@2_v%&0)Jp+gbsOO;0HmGiQV%RwkNgilC}-N{WS>V|G4g) bI~0)lN6;$U$3*k!(*vx`uM(?Fy;A-Q6zIHu literal 0 HcmV?d00001 diff --git a/templates.fif.json b/templates.fif.json index 543b0ada..d26519c5 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 00000000..c2022ef1 --- /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: