fix ping@openssh being passed to unsupported sshd (#326)
* add testcase * Fix formatting in e2e/fixed_test.go * disable ping until we have a solution
This commit is contained in:
parent
715bcbdb49
commit
fb8eba9f91
4 changed files with 14 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/golang:1.22-bullseye as builder
|
||||
FROM docker.io/golang:1.22.0-alpine3.19 as builder
|
||||
|
||||
ARG VER=devel
|
||||
ARG BUILDTAGS=""
|
||||
|
|
@ -12,6 +12,9 @@ RUN --mount=target=/src,type=bind,source=. --mount=type=cache,target=/root/.cach
|
|||
RUN --mount=target=/src,type=bind,source=. --mount=type=cache,target=/root/.cache/go-build if [ "$EXTERNAL" = "1" ]; then cp -r plugins /sshpiperd ; else go build -o /sshpiperd/plugins -tags "$BUILDTAGS" ./plugin/...; fi
|
||||
ADD entrypoint.sh /sshpiperd
|
||||
|
||||
FROM builder as testrunner
|
||||
RUN apk add openssh-client git bash coreutils
|
||||
|
||||
FROM docker.io/busybox
|
||||
LABEL maintainer="Boshi Lian<farmer1992@gmail.com>"
|
||||
|
||||
|
|
|
|||
2
crypto
2
crypto
|
|
@ -1 +1 @@
|
|||
Subproject commit e94916bae9d623c977f9f515cc21cd9f39f5cb3a
|
||||
Subproject commit 06bd4d377ec44ce00cbd9a5084f40b8980c94e0e
|
||||
|
|
@ -86,7 +86,7 @@ services:
|
|||
- DOCKER_API_VERSION=1.40
|
||||
build:
|
||||
context: ../
|
||||
target: builder
|
||||
target: testrunner
|
||||
args:
|
||||
- BUILDTAGS=e2e
|
||||
volumes:
|
||||
|
|
|
|||
|
|
@ -40,12 +40,14 @@ func TestFixed(t *testing.T) {
|
|||
"StrictHostKeyChecking=no",
|
||||
"-o",
|
||||
"UserKnownHostsFile=/dev/null",
|
||||
"-o",
|
||||
"RequestTTY=yes",
|
||||
"-p",
|
||||
piperport,
|
||||
"-l",
|
||||
"user",
|
||||
"127.0.0.1",
|
||||
fmt.Sprintf(`sh -c "echo -n %v > /shared/%v"`, randtext, targetfie),
|
||||
fmt.Sprintf(`sh -c "echo SSHREADY && sleep 1 && echo -n %v > /shared/%v"`, randtext, targetfie), // sleep 1 to cover https://github.com/tg123/sshpiper/issues/323
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
|
@ -56,7 +58,11 @@ func TestFixed(t *testing.T) {
|
|||
|
||||
enterPassword(stdin, stdout, "pass")
|
||||
|
||||
time.Sleep(time.Second) // wait for file flush
|
||||
waitForStdoutContains(stdout, "SSHREADY", func(_ string) {
|
||||
_, _ = stdin.Write([]byte(fmt.Sprintf("%v\n", "triggerping")))
|
||||
})
|
||||
|
||||
time.Sleep(time.Second * 3) // wait for file flush
|
||||
|
||||
checkSharedFileContent(t, targetfie, randtext)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue