fix: Add test for SCP (#2692)

* fix: Elongate agent disconnect timeout in tests

This will fix the flake seen here:
https://github.com/coder/coder/runs/7071719863?check_suite_focus=true

* fix: Add test for SCP

This was hanging due to the stdin pipe never being closed.
A test has been added to make sure it works!
This commit is contained in:
Kyle Carberry
2022-06-27 11:41:53 -05:00
committed by GitHub
parent a805565cd4
commit d9da96cad0
4 changed files with 19 additions and 0 deletions

View File

@ -467,6 +467,7 @@ func (a *agent) handleSSHSession(session ssh.Session) error {
}
go func() {
_, _ = io.Copy(stdinPipe, session)
_ = stdinPipe.Close()
}()
err = cmd.Start()
if err != nil {