|
| 1 | +*** Settings *** |
| 2 | +Library Collections |
| 3 | +Library Dialogs |
| 4 | +Library DateTime |
| 5 | +Library OperatingSystem |
| 6 | +Library Process |
| 7 | +Library String |
| 8 | +Library Telnet timeout=20 seconds connection_timeout=120 seconds |
| 9 | +Resource ../variables.robot |
| 10 | +Resource ../keywords.robot |
| 11 | +Resource ../keys.robot |
| 12 | + |
| 13 | +# Log Out And Close Connection - elementary teardown keyword for all tests. |
| 14 | +Suite Setup Run Keywords |
| 15 | +... Prepare Test Suite |
| 16 | +Suite Teardown Run Keywords |
| 17 | +... Log Out And Close Connection |
| 18 | +Test Setup Run Keyword |
| 19 | +... Restore Initial DUT Connection Method |
| 20 | + |
| 21 | + |
| 22 | +*** Test Cases *** |
| 23 | +PFS001.502 Install pfSense LTS CE (serial output) on disk |
| 24 | + [Documentation] Install pfSense LTS CE (serial output) from preseeded |
| 25 | + ... USB stick on disk. Refer to test case PFS006.502 for preseed. |
| 26 | + Power On |
| 27 | + Boot PfSense Installer |
| 28 | + ${installer_message}= Catenate Click OK, after test execution ends, |
| 29 | + ... connect to DUT via serial and continue manual installation. |
| 30 | + Pause Execution ${installer_message} |
| 31 | + |
| 32 | +PFS002.502 Boot pfSense LTS CE (serial output) from disk |
| 33 | + [Documentation] Boot pfSense LTS CE (serial output) from disk. |
| 34 | + Power On |
| 35 | + Boot PfSense |
| 36 | + |
| 37 | +PFS003.502 Boot pfSense LTS CE (serial output) from disk after cold-boot |
| 38 | + [Documentation] Boot pfSense LTS CE (serial output) from disk after cold-boot |
| 39 | + Power On |
| 40 | + Set UEFI Option PowerStateAfterPowerAcLoss Powered On |
| 41 | + Sleep 1 |
| 42 | + Rte Psu Off |
| 43 | + Sleep 5 |
| 44 | + Rte Psu On |
| 45 | + ${start_date}= Get Current Date |
| 46 | + Boot PfSense |
| 47 | + ${end_date}= Get Current Date |
| 48 | + ${delta_time}= Subtract Date From Date ${end_date} ${start_date} |
| 49 | + Log To Console Cold boot duration in seconds: ${delta_time}} |
| 50 | + |
| 51 | +PFS004.502 Boot pfSense LTS CE (serial output) from disk after warm-boot |
| 52 | + [Documentation] Boot pfSense LTS CE (serial output) from disk after warm-boot |
| 53 | + Power On |
| 54 | + Boot PfSense |
| 55 | + Enter PfSense Shell |
| 56 | + Write Into Terminal poweroff |
| 57 | + Power On |
| 58 | + ${start_date}= Get Current Date |
| 59 | + Boot PfSense |
| 60 | + ${end_date}= Get Current Date |
| 61 | + ${delta_time}= Subtract Date From Date ${end_date} ${start_date} |
| 62 | + Log To Console Warm boot duration in seconds: ${delta_time}} |
| 63 | + |
| 64 | +PFS005.502 Boot pfSense LTS CE (serial output) from disk after reboot |
| 65 | + [Documentation] Boot pfSense LTS CE (serial output) from disk after reboot |
| 66 | + Power On |
| 67 | + Boot PfSense |
| 68 | + Enter PfSense Shell |
| 69 | + Write Into Terminal reboot |
| 70 | + ${start_date}= Get Current Date |
| 71 | + Boot PfSense |
| 72 | + ${end_date}= Get Current Date |
| 73 | + ${delta_time}= Subtract Date From Date ${end_date} ${start_date} |
| 74 | + Log To Console Reboot duration in seconds: ${delta_time}} |
| 75 | + |
| 76 | + |
| 77 | +PFS006.502 Preseed pfSense Installer |
| 78 | + [Documentation] Please use linux fatlabel program to rename ESP partition of |
| 79 | + ... pfSense installer to PFEFI. |
| 80 | + Execute Manual Step Rename ESP partition of pfSense installer to PFEFI. |
| 81 | + |
| 82 | + Power On |
| 83 | + Boot PfSense Installer |
| 84 | + Enter PfSense Rescue Shell |
| 85 | + Execute Command In Terminal |
| 86 | + ... awk -v sq="'" -v dq='"' -v ROOT_LABEL=PFBOOT '/^NEWFS_ESP=/ { print "NEWFS_ESP=" sq "newfs_msdos -L " ROOT_LABEL " " dq "%s" dq sq; next; }; { print; }' /usr/libexec/bsdinstall/zfsboot > /tmp/zfsboot |
| 87 | + Execute Command In Terminal mount -u / |
| 88 | + Execute Command In Terminal mv /tmp/zfsboot /usr/libexec/bsdinstall/zfsboot |
| 89 | + Execute Command In Terminal chmod +x /usr/libexec/bsdinstall/zfsboot |
| 90 | + Execute Command In Terminal sync |
| 91 | + ${output}= Execute Command In Terminal grep PFBOOT /usr/libexec/bsdinstall/zfsboot |
| 92 | + Should Contain ${output} PFBOOT |
| 93 | + |
| 94 | +PFS007.502 Boot pfSense LTS CE (serial output) Installer into rescue shell |
| 95 | + Power On |
| 96 | + Boot PfSense Installer |
| 97 | + Enter PfSense Rescue Shell |
| 98 | + ${output}= Execute Command In Terminal ls |
| 99 | + Should Contain ${output} COPYRIGHT |
| 100 | + Should Contain ${output} .profile |
| 101 | + |
| 102 | + |
0 commit comments