|
| 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 | +... AND |
| 16 | +... Restore Secure Boot Defaults |
| 17 | +Suite Teardown Run Keywords |
| 18 | +... Run Keyword If ${SECURE_BOOT_SUPPORT} and ${TESTS_IN_FIRMWARE_SUPPORT} Set Secure Boot State To Disabled |
| 19 | +... AND |
| 20 | +... Log Out And Close Connection |
| 21 | +Test Setup Run Keyword |
| 22 | +... Restore Initial DUT Connection Method |
| 23 | + |
| 24 | + |
| 25 | +*** Variables *** |
| 26 | +${PFSENSE_PROMPT}= [ 2.7.2-RELEASE][ [email protected]]/root |
| 27 | + |
| 28 | + |
| 29 | +*** Test Cases *** |
| 30 | +BPS001.001 Boot pfSense LTS CE (serial output) from disk after cold-boot |
| 31 | + [Documentation] Boot pfSense LTS CE (serial output) from disk after cold-boot |
| 32 | + Power On |
| 33 | + |
| 34 | +BPS002.001 Boot pfSense LTS CE (serial output) from disk after warm-boot |
| 35 | + Power On |
| 36 | + |
| 37 | +BPS003.001 Boot pfSense LTS CE (serial output) from disk after reboot |
| 38 | + Power On |
| 39 | + |
| 40 | +OPN001.001 OPNsense stable (serial output) installation on Hard Disk |
| 41 | + Power On |
| 42 | + Boot OPNsense Installer |
| 43 | + |
| 44 | +OPN001.002 Boot OPNsense stable (serial output) from Hard Disk |
| 45 | + Power On |
| 46 | + |
| 47 | +PFS001.001 pfSense stable (serial output) installation on Hard Disk |
| 48 | + Power On |
| 49 | + Boot PfSense Installer |
| 50 | +# Enter pfSense Rescue Shell |
| 51 | + Install PsSense On Sata Drive |
| 52 | + |
| 53 | +PFS001.002 Boot pfSense stable (serial output) from Hard Disk |
| 54 | + Power On |
| 55 | + Boot Pf Sense |
| 56 | + |
| 57 | + |
| 58 | +*** Keywords *** |
| 59 | +# Relabel pfSense ESP |
| 60 | +# |
| 61 | + |
| 62 | +Boot PfSense Installer |
| 63 | + [Documentation] Run /EFI/BOOT/bootx64.efi file from PFEFI-labeled partition; |
| 64 | + ... Select console type vt100 and accept the license |
| 65 | + Enter Boot From File |
| 66 | + Enter Volume In File Explorer PFEFI |
| 67 | + Execute File In File Explorer EFI |
| 68 | + Execute File In File Explorer BOOT |
| 69 | + Execute File In File Explorer bootx64.efi |
| 70 | + Read From Terminal Until Console type [vt100]: |
| 71 | + Write Into Terminal vt100 |
| 72 | + Read From Terminal Until [Accept] |
| 73 | + Press Enter |
| 74 | + |
| 75 | +Boot OPNsense Installer |
| 76 | + [Documentation] Run /efi/boot/bootx64.efi file from OPNEFI-labeled partition; |
| 77 | + Enter Boot From File |
| 78 | + Enter Volume In File Explorer OPNEFI |
| 79 | + Execute File In File Explorer efi |
| 80 | + Execute File In File Explorer boot |
| 81 | + Execute File In File Explorer bootx64.efi |
| 82 | + Read From Terminal Until FreeBSD/amd64 (OPNsense.localdomain) (ttyu0) |
| 83 | + Read From Terminal Until login: |
| 84 | + |
| 85 | +Enter PfSense Rescue Shell |
| 86 | + ${menu}= Read From Terminal Until OK |
| 87 | + # end would be 5 but it's 3 due to two empty lines |
| 88 | + ${construction}= Parse Menu Snapshot Into Construction ${menu} 5 3 |
| 89 | + Enter Submenu From Snapshot ${construction} Rescue Shell${SPACE_*_8}Launch a shell for rescue operations |
| 90 | + Write Into Terminal root |
| 91 | + Write Into Terminal root |
| 92 | + |
| 93 | +Enter OPN Sense Rescue Shell: |
| 94 | + Read From Terminal FreeBSD/amd64 (OPNsense.localdomain) (ttyu0) |
| 95 | + Read From Terminal Until login: |
| 96 | + Write Into Terminal root |
| 97 | + Read From Terminal Until Password: |
| 98 | + Write Into Terminal opnsense |
| 99 | + Read From Terminal Until Enter an option: |
| 100 | + Write Into Terminal 8 |
| 101 | + |
| 102 | +Install PsSense On Sata Drive |
| 103 | + ${welcome_menu}= Read From Terminal Until OK |
| 104 | + # end would be 5 but it's 3 due to two empty lines |
| 105 | + ${welcome_construction}= Parse Menu Snapshot Into Construction ${welcome_menu} 5 3 |
| 106 | + Enter Submenu From Snapshot ${welcome_construction} Install${SPACE_*_13}Install pfSense |
| 107 | + ${partition_construction}= Get Submenu Construction OK 5 3 |
| 108 | + Enter Submenu From Snapshot ${partition_construction} Auto (ZFS)${SPACE_*_2}Guided Root-on-ZFS |
| 109 | + Read From Terminal Until ZFS Configuration |
| 110 | + ${pool_suspect}= Read From Terminal |
| 111 | + ${pool_taken}= Run Keyword And Return Status |
| 112 | + ... Should Contain |
| 113 | + ... ${pool_suspect} |
| 114 | + ... pfSense is already taken, please enter a name for the ZFS pool |
| 115 | + ${my_tail2}= Read From Terminal |
| 116 | + Log To Console "my tail2" |
| 117 | + Log To Console ${my_tail2} |
| 118 | + IF ${pool_taken} == ${TRUE} |
| 119 | + Press Enter |
| 120 | + ${pool_suspect}= Read From Terminal Until qqqqqj |
| 121 | + END |
| 122 | + Log To Console "pool suspect" |
| 123 | + Log To Console ${pool_suspect} |
| 124 | + ${configure_construction}= Parse Menu Snapshot Into Construction ${pool_suspect} 5 1 |
| 125 | + # Enter Submenu From Snapshot ${configure_construction} T Pool Type/Disks:${SPACE * 3}stripe: 0 disks |
| 126 | + Press Key N Times And Enter 1 ${ARROW_DOWN} |
| 127 | + ${my_tail3}= Read From Terminal |
| 128 | + Log To Console "my tail3" |
| 129 | + Log To Console ${my_tail3} |
| 130 | + ${select_virtual}= Get Submenu Construction OK 5 3 |
| 131 | + # Read From Terminal Until Select Virtual Device type |
| 132 | + # ${select_virtual}= Read From Terminal Until Cancel |
| 133 | + |
| 134 | +Boot Pf Sense |
| 135 | + [Documentation] PFBOOT -> /efi/freebsd/loader.efi |
| 136 | + Enter Boot From File |
| 137 | + Enter Volume In File Explorer PFBOOT |
| 138 | + Execute File In File Explorer efi |
| 139 | + Execute File In File Explorer freebsd |
| 140 | + Execute File In File Explorer loader.efi |
| 141 | + Read From Terminal Until Enter an option: |
| 142 | + Write Into Terminal 8 |
| 143 | + Read From Terminal Until ${PFSENSE_PROMPT} |
0 commit comments