test: add a local Docker test environment for all features
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>
This commit is contained in:
1 parent
55e7a5106b
commit
dbb99bdded
34 files changed
+1215
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# SSH target for the netssh test environment: every NetBox host, the bastion,
|
||||
# and the static host run this image with a different hostname.
|
||||
FROM alpine:3.23
|
||||
|
||||
# Alpine locks new accounts with "!"; sshd refuses key logins for locked
|
||||
# accounts, so the password field is set to "*" (no password, not locked).
|
||||
RUN apk add --no-cache openssh-server openssh-sftp-server python3 \
|
||||
&& for user in ops admin; do \
|
||||
adduser -D -s /bin/sh "$user" && sed -i "s/^$user:!/$user:*/" /etc/shadow; \
|
||||
done
|
||||
|
||||
COPY testenv/targets/sshd_config /etc/ssh/sshd_config
|
||||
COPY testenv/targets/entrypoint.sh /entrypoint.sh
|
||||
|
||||
EXPOSE 22 2222
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in new issue
Block a user