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>
24 lines
874 B
Docker
24 lines
874 B
Docker
# Client for the netssh test environment: netssh built from this repository
|
|
# plus everything it drives or integrates with (ssh, sftp, scp, tmux, zellij,
|
|
# bash, zsh, fish). Rebuild after code changes: testenv/up.sh or
|
|
# docker compose -f testenv/compose.yaml build client
|
|
FROM golang:1.27.4-alpine3.23 AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY cmd ./cmd
|
|
COPY internal ./internal
|
|
RUN CGO_ENABLED=0 go build -o /out/netssh ./cmd/netssh
|
|
|
|
FROM alpine:3.23
|
|
RUN apk add --no-cache openssh-client-default tmux zellij bash zsh fish bash-completion \
|
|
curl python3 jq ncurses coreutils \
|
|
&& adduser -D -s /bin/bash tester
|
|
COPY --from=build /out/netssh /usr/local/bin/netssh
|
|
COPY testenv/client-entrypoint.sh /entrypoint.sh
|
|
USER tester
|
|
WORKDIR /home/tester
|
|
ENV TERM=xterm-256color LANG=C.UTF-8
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["sleep", "infinity"]
|