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
|
|
@ -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