tcp-proxy/pkg/common/common_test.go

34 lines
587 B
Go

package common
import "testing"
func TestCheckRemoteSSH(t *testing.T) {
type args struct {
host string
port int
timeout int
}
tests := []struct {
name string
args args
want error
}{
{
name: "test check localhost ssh port",
args: args{
host: "localhost",
port: 22,
timeout: 5,
},
want: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := CheckRemoteTCP(tt.args.host, tt.args.port, tt.args.timeout); got != tt.want {
t.Errorf("CheckRemoteSSH() = %v, want %v", got, tt.want)
}
})
}
}