5ace885c717b
record G-12 routing validated via ssh-to-self; add multimachine test; all 12 groups exercised
- time
- 2026-05-30 03:31 UTC · 4 months ago
- machine
- koh2
- parent
- eff585c773cf
↓ nina-5ace885c.tar.gzatlas at this save
files changed1 file
test/vm/tests/multimachine.sh+58 −0test/vm/tests/multimachine.sh+58 −0
@@ -0,0 +1,58 @@1+#!/usr/bin/env sh2+# G-12 multi-machine ROUTING validation via SSH-to-self: test-remote points at3+# 127.0.0.1, so `--on test-remote` exercises nina's full SSH routing (build ssh4+# argv, connect, run remotely, parse output) and `status --all` aggregation.5+# CAVEAT: test-remote IS this machine, so this validates the --on plumbing, NOT6+# physical isolation (separate generation counts need two real networked VMs).7+set -u8+N=/root/nina9+10+echo "KILN_MM_BEGIN"11+12+mkdir -p /root/.ssh && chmod 700 /root/.ssh13+ssh-keygen -t ed25519 -N '' -f /root/.ssh/id_test </dev/null >/dev/null 2>&114+cat /root/.ssh/id_test.pub >> /root/.ssh/authorized_keys15+chmod 600 /root/.ssh/authorized_keys16+17+cat > /root/.nina.conf <<EOF18+editor = vim19+generations = 520+confirm = false21+teach = true22+color = true23+24+[machine]25+name = test-primary26+config = /etc/nixos27+local = true28+default = true29+30+[machine]31+name = test-remote32+host = 127.0.0.133+user = root34+ssh_key = /root/.ssh/id_test35+EOF36+37+echo "### T-153 nina hello (test-primary local, test-remote ssh)"38+$N hello </dev/null; echo "HELLO_RC=$?"39+40+echo "### T-160 nina status --all (both machines in table)"41+$N status --all </dev/null; echo "STATUSALL_RC=$?"42+43+echo "### T-164 nina history --on test-remote (via ssh)"44+$N history --on test-remote </dev/null; echo "HISTREMOTE_RC=$?"45+46+echo "### T-166 nina service list --on test-remote (via ssh)"47+$N service list --on test-remote </dev/null; echo "SVCREMOTE_RC=$?"48+49+echo "### T-165 nina doctor --on test-remote (via ssh)"50+$N doctor --on test-remote </dev/null; echo "DOCTORREMOTE_RC=$?"51+52+echo "### T-162 nina apply --on test-remote (ssh -> nixos-rebuild switch on self)"53+$N apply --on test-remote </dev/null; echo "APPLYREMOTE_RC=$?"54+55+echo "### T-167 nina status --on ghost-machine (expect error)"56+$N status --on ghost-machine </dev/null; echo "GHOST_RC=$?"57+58+echo "KILN_MM_END"