tests/16-render.sh runs tmux, zellij, and the TUI in xterm on Xvfb, takes screenshots, and reads them back with tesseract: remote prompts in all panes, borders and titles with the hosts, [SYNC] appearing and disappearing, panes side by side, broadcast output in every pane and input in one pane only without it, windows split by panes_per_window, the status bar, and TUI marks. Screenshots stay in testenv/.artifacts. OCR reads three preprocessing variants (plain, stretched for dim gray, brightest channel for colored text) and normalizes characters that DejaVu Sans Mono makes ambiguous (1/l, C/(). The screenshots showed tmux cutting the session name in the status bar to "[netssh-pv"; netssh multi now widens status-left-length for its own session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.1 KiB
Docker
27 lines
1.1 KiB
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
|
|
# xvfb/xterm/imagemagick/tesseract: render panes in a real terminal emulator,
|
|
# take screenshots, and read them back with OCR (tests/16-render.sh).
|
|
RUN apk add --no-cache openssh-client-default tmux zellij bash zsh fish bash-completion \
|
|
curl python3 jq ncurses coreutils \
|
|
xvfb xterm imagemagick tesseract-ocr tesseract-ocr-data-eng font-dejavu \
|
|
&& 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"]
|