|
| 1 | +*** Settings *** |
| 2 | +Library Collections |
| 3 | +Library Dialogs |
| 4 | +Library OperatingSystem |
| 5 | +Library Process |
| 6 | +Library String |
| 7 | +Library Telnet timeout=20 seconds connection_timeout=120 seconds |
| 8 | +Resource ../variables.robot |
| 9 | +Resource ../keywords.robot |
| 10 | +Resource ../keys.robot |
| 11 | + |
| 12 | +# Log Out And Close Connection - elementary teardown keyword for all tests. |
| 13 | +Suite Setup Run Keywords |
| 14 | +... Prepare Test Suite |
| 15 | +Suite Teardown Run Keywords |
| 16 | +... Log Out And Close Connection |
| 17 | +Test Setup Run Keyword |
| 18 | +... Restore Initial DUT Connection Method |
| 19 | + |
| 20 | + |
| 21 | +*** Variables *** |
| 22 | +${PFSENSE_PROMPT}= [ 2.7.2-RELEASE][ [email protected]]/root |
| 23 | + |
| 24 | + |
| 25 | +*** Test Cases *** |
| 26 | +PFS001.502 Boot pfSense LTS CE (serial output) from disk after cold-boot |
| 27 | + [Documentation] Boot pfSense LTS CE (serial output) from disk after cold-boot |
| 28 | + Power On |
| 29 | + # TBD |
| 30 | + |
| 31 | +OPN001.503 Boot OPNsense (serial output) from disk after cold-boot |
| 32 | + [Documentation] Boot OPNsense (serial output) from disk after cold-boot |
| 33 | + Power On |
| 34 | + Boot OPN |
| 35 | + # TBD |
| 36 | + |
| 37 | +PFS002.502 Boot pfSense LTS CE (serial output) from disk after warm-boot |
| 38 | + [Documentation] Boot pfSense LTS CE (serial output) from disk after warm-boot |
| 39 | + ... does not use rtcwake!!! |
| 40 | + Power On |
| 41 | + Boot PfSense |
| 42 | + Enter Pf Sense Shell |
| 43 | + Write Into Terminal poweroff |
| 44 | + Power On |
| 45 | + Boot PfSense |
| 46 | + |
| 47 | +PFS003.502 Boot pfSense LTS CE (serial output) from disk after reboot |
| 48 | + [Documentation] Boot pfSense LTS CE (serial output) from disk after reboot |
| 49 | + Power On |
| 50 | + Boot PfSense |
| 51 | + Enter Pf Sense Shell |
| 52 | + Write Into Terminal reboot |
| 53 | + Boot PfSense |
| 54 | + |
| 55 | +PFS004.502 Boot pfSense LTS CE (serial output) Installer into rescue shell |
| 56 | + Power On |
| 57 | + Boot PfSense Installer |
| 58 | + Enter PfSense Rescue Shell |
| 59 | + ${output}= Execute Command In Terminal ls |
| 60 | + Should Contain ${output} COPYRIGHT |
| 61 | + Should Contain ${output} .profile |
| 62 | + |
| 63 | +PFS005.502 Preseed pfSense Installer |
| 64 | + Power On |
| 65 | + Boot PfSense Installer |
| 66 | + Enter PfSense Rescue Shell |
| 67 | + Execute Command In Terminal |
| 68 | + ... 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 |
| 69 | + Execute Command In Terminal mount -u / |
| 70 | + Execute Command In Terminal mv /tmp/zfsboot /usr/libexec/bsdinstall/zfsboot |
| 71 | + Execute Command In Terminal chmod +x /usr/libexec/bsdinstall/zfsboot |
| 72 | + Execute Command In Terminal sync |
| 73 | + ${output}= Execute Command In Terminal grep PFBOOT /usr/libexec/bsdinstall/zfsboot |
| 74 | + Should Contain ${output} PFBOOT |
| 75 | + |
| 76 | +# There's no OPN005.503, preseed requires another FreeBSD system |
| 77 | + |
| 78 | +PFS006.502 Boot pfSense Installer |
| 79 | + Power On |
| 80 | + Boot PfSense Installer |
| 81 | + Execute Manual Step Click OK to PASS, after test ends, connect to DUT via serial and continue. |
| 82 | + |
| 83 | +OPN006.503 Boot OPNsense Installer |
| 84 | + Power On |
| 85 | + Boot OPNsense Installer |
| 86 | + Execute Manual Step Click OK to PASS, after test ends, connect to DUT via serial and continue. |
| 87 | + |
| 88 | + |
| 89 | +*** Keywords *** |
| 90 | +Boot PfSense Installer |
| 91 | + [Documentation] Run /EFI/BOOT/bootx64.efi file from PFEFI-labeled partition; |
| 92 | + ... Select console type vt100 and accept the license |
| 93 | + Enter Boot From File |
| 94 | + Enter Volume In File Explorer PFEFI |
| 95 | + Execute File In File Explorer EFI |
| 96 | + Execute File In File Explorer BOOT |
| 97 | + Execute File In File Explorer bootx64.efi |
| 98 | + Read From Terminal Until Console type [vt100]: |
| 99 | + Write Into Terminal vt100 |
| 100 | + Read From Terminal Until [Accept] |
| 101 | + Press Enter |
| 102 | + |
| 103 | +Boot OPNsense Installer |
| 104 | + [Documentation] Run /efi/boot/bootx64.efi file from OPNEFI-labeled partition; |
| 105 | + Enter Boot From File |
| 106 | + Enter Volume In File Explorer OPNEFI |
| 107 | + Execute File In File Explorer efi |
| 108 | + Execute File In File Explorer boot |
| 109 | + Execute File In File Explorer bootx64.efi |
| 110 | + Read From Terminal Until FreeBSD/amd64 (OPNsense.localdomain) (ttyu0) |
| 111 | + Read From Terminal Until login: |
| 112 | + |
| 113 | +Enter PfSense Shell |
| 114 | + Write Into Terminal 8 |
| 115 | + Read From Terminal Until ${PFSENSE_PROMPT} |
| 116 | + Set Prompt For Terminal ${PFSENSE_PROMPT} |
| 117 | + |
| 118 | +Enter PfSense Rescue Shell |
| 119 | + ${menu}= Read From Terminal Until <Cancel> |
| 120 | + # end would be 5 but it's 3 due to two empty lines |
| 121 | + ${construction}= Parse Menu Snapshot Into Construction ${menu} 5 3 |
| 122 | + Enter Submenu From Snapshot |
| 123 | + ... ${construction} |
| 124 | + ... Rescue Shell${SPACE_*_8}Launch a shell for rescue operations |
| 125 | + ... "APP" |
| 126 | + Set Prompt For Terminal \# |
| 127 | + |
| 128 | +Enter OPN Sense Rescue Shell: |
| 129 | + Read From Terminal FreeBSD/amd64 (OPNsense.localdomain) (ttyu0) |
| 130 | + Read From Terminal Until login: |
| 131 | + Write Into Terminal root |
| 132 | + Read From Terminal Until Password: |
| 133 | + Write Into Terminal opnsense |
| 134 | + Read From Terminal Until Enter an option: |
| 135 | + Write Into Terminal 8 |
| 136 | + |
| 137 | +Boot PfSense |
| 138 | + [Documentation] PFBOOT -> /efi/boot/bootx64.efi |
| 139 | + Enter Boot From File |
| 140 | + Enter Volume In File Explorer PFBOOT |
| 141 | + Execute File In File Explorer efi |
| 142 | + Execute File In File Explorer boot |
| 143 | + Execute File In File Explorer bootx64.efi |
| 144 | + Read From Terminal Until Enter an option: |
| 145 | + |
| 146 | +Boot OPN Sense |
| 147 | + Enter Boot From File |
| 148 | + Enter Volume In File Explorer OPNBOOT |
| 149 | + Execute File In File Explorer efi |
| 150 | + Execute File In File Explorer boot |
| 151 | + Execute File In File Explorer bootx64.efi |
0 commit comments