Skip to content

Commit

Permalink
test: tests for SSH connector
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <[email protected]>
  • Loading branch information
matejvasek committed Oct 2, 2023
1 parent 5ffdf75 commit 62ae60d
Show file tree
Hide file tree
Showing 4 changed files with 1,673 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pkg/ssh/posix_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//go:build !windows
// +build !windows

package ssh_test

import (
"errors"
"net"
"os"
)

func fixupPrivateKeyMod(path string) {
err := os.Chmod(path, 0600)
if err != nil {
panic(err)
}
}

func listen(addr string) (net.Listener, error) {
return net.Listen("unix", addr)
}

func isErrClosed(err error) bool {
return errors.Is(err, net.ErrClosed)
}
Loading

0 comments on commit 62ae60d

Please sign in to comment.