testenv/ starts two real NetBox 4.7 instances (v2 and v1 token), SSH targets on public, mgmt, and prod networks, a jump host, an IPv6-only host, a static host, and a client with ssh, sftp, scp, tmux, zellij, bash, zsh, and fish. A seed script fills NetBox through the REST API. 141 end-to-end checks cover cache and refresh filters, connecting, all resolver strategies, multiple instances, shortcuts and rewrites, SSH options and rules, static hosts, sftp/scp incl. IPv6 and jump hosts, tunnels, local notes and NetBox comments, completion and shell hooks, the TUI (driven through tmux), the configurator, and uninstall. Local only: testenv/up.sh, test.sh, shell.sh, down.sh. Not part of CI/CD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
562 B
Bash
Executable File
21 lines
562 B
Bash
Executable File
#!/bin/sh
|
|
# ssh reads ~/.ssh from the passwd entry, not $HOME, so the key and ssh config
|
|
# live in /home/tester for every test; tests isolate netssh via HOME/XDG_*.
|
|
set -eu
|
|
mkdir -p /home/tester/.ssh
|
|
if [ -f /keys/id_ed25519 ]; then
|
|
install -m 600 /keys/id_ed25519 /home/tester/.ssh/id_ed25519
|
|
fi
|
|
cat >/home/tester/.ssh/config <<'EOF'
|
|
Host *
|
|
IdentityFile ~/.ssh/id_ed25519
|
|
IdentitiesOnly yes
|
|
BatchMode yes
|
|
ConnectTimeout 5
|
|
StrictHostKeyChecking accept-new
|
|
LogLevel ERROR
|
|
EOF
|
|
chmod 700 /home/tester/.ssh
|
|
chmod 600 /home/tester/.ssh/config
|
|
exec "$@"
|