@@ -450,7 +450,7 @@ it "option s → 1 starts OpenVPN server"
450450select_option " s"
451451expect_send " Select action" " 1" 5
452452# start runs /etc/init.d/openvpn start + sleep 2 — wait for status line then gate
453- wait_for " Server started\|already running" 20
453+ wait_for " Server started\|already running" 8
454454check wait_for " Press Enter" 5
455455send " "
456456check wait_for " Select an option:" 5
472472it " option s → 2 stops OpenVPN server"
473473select_option " s"
474474expect_send " Select action" " 2" 5
475- expect_send " Stop OpenVPN server" " yes" 10
475+ expect_send " Stop OpenVPN server" " yes" 5
476476# stop runs /etc/init.d/openvpn stop + sleep 2 — wait for status line then gate
477- wait_for " Server stopped\|stopped successfully\|already stopped" 20
477+ wait_for " Server stopped\|stopped successfully\|already stopped" 8
478478check wait_for " Press Enter" 5
479479send " "
480480check wait_for " Select an option:" 5
@@ -628,6 +628,47 @@ select_option "4"
628628wait_for " Detected WAN IP\|Detected DDNS" 20
629629check wait_for " Select an option:" 20
630630
631+ # ── Suite 13: Config Mutations (options 7, 8, 9) ─────────────────────────────
632+ # option 7 — restore server.conf from backup (backup created by Suite 2 option 5)
633+ # option 8 — toggle IPv6 (default disabled; answer 'no' to keep disabled)
634+ # option 9 — configure performance: cancel, then set bandwidth limit
635+ # option 7 has no Press Enter gate — returns directly to menu.
636+
637+ printf " \n--- [%s] Suite 13: Config Mutations (options 7, 8, 9) ---\n" " $( ts) "
638+
639+ it " option 7 restores server.conf from backup (no restart)"
640+ select_option " 7"
641+ expect_send " Backup found.*Continue\|Continue" " yes" 5
642+ wait_for " Configuration restored" 5
643+ expect_send " Restart OpenVPN" " n" 5
644+ check wait_for " Select an option:" 5
645+
646+ it " server.conf still exists after restore"
647+ check assert_file_exists " $OVPN_CONF "
648+
649+ it " option 8 shows IPv6 status and cancels when answered 'no'"
650+ select_option " 8"
651+ wait_for " IPv6 Configuration" 5
652+ wait_for " currently DISABLED\|currently ENABLED" 5
653+ expect_send " Enable IPv6\|Select option" " no" 5
654+ expect_send " Press Enter" " " 5
655+ check wait_for " Select an option:" 5
656+
657+ it " option 9 → 2 cancels performance config"
658+ select_option " 9"
659+ expect_send " Select option" " 2" 5
660+ wait_for " Cancelled" 5
661+ expect_send " Press Enter" " " 5
662+ check wait_for " Select an option:" 5
663+
664+ it " option 9 → 1 sets bandwidth limit"
665+ select_option " 9"
666+ expect_send " Select option" " 1" 5
667+ expect_send " Enter bandwidth limit" " 1000000" 5
668+ wait_for " Bandwidth limit set to" 5
669+ expect_send " Press Enter" " " 5
670+ check wait_for " Select an option:" 5
671+
631672# ── Done ──────────────────────────────────────────────────────────────────────
632673
633674quit_script
0 commit comments