Fix travisci tests

Bind to localhost rather than all hosts.
This commit is contained in:
Andrey Petrov committed 2016-08-02 16:03:19 -04:00
1 parent 58e1cb60bd
commit 1662ecd431
4 files changed
+8 -13

No files matched your search

+1 -6
View File
@@ -12,14 +12,9 @@ env:
install:
- go get -t ./...
- go get github.com/golang/lint/golint
- go get github.com/gordonklaus/ineffassign
script:
- diff <(echo -n) <(gofmt -s -d .)
- ineffassign .
- go vet $(go list ./... | grep -v /vendor/)
- go test $(go list ./... | grep -v /vendor/)
after_script:
- golint ./...
- go test -v $(go list ./... | grep -v /vendor/)
+3 -3
View File
@@ -51,7 +51,7 @@ func TestHostNameCollision(t *testing.T) {
config := sshd.MakeNoAuth()
config.AddHostKey(key)
s, err := sshd.ListenSSH(":0", config)
s, err := sshd.ListenSSH("localhost:0", config)
if err != nil {
t.Fatal(err)
}
@@ -134,7 +134,7 @@ func TestHostWhitelist(t *testing.T) {
config := sshd.MakeAuth(auth)
config.AddHostKey(key)
s, err := sshd.ListenSSH(":0", config)
s, err := sshd.ListenSSH("localhost:0", config)
if err != nil {
t.Fatal(err)
}
@@ -173,7 +173,7 @@ func TestHostKick(t *testing.T) {
config := sshd.MakeAuth(auth)
config.AddHostKey(key)
s, err := sshd.ListenSSH(":0", config)
s, err := sshd.ListenSSH("localhost:0", config)
if err != nil {
t.Fatal(err)
}
+1 -1
View File
@@ -24,7 +24,7 @@ func TestClientReject(t *testing.T) {
config := MakeAuth(RejectAuth{})
config.AddHostKey(signer)
s, err := ListenSSH(":0", config)
s, err := ListenSSH("localhost:0", config)
if err != nil {
t.Fatal(err)
}
+3 -3
View File
@@ -8,12 +8,12 @@ import (
func TestServerInit(t *testing.T) {
config := MakeNoAuth()
s, err := ListenSSH(":badport", config)
s, err := ListenSSH("localhost:badport", config)
if err == nil {
t.Fatal("should fail on bad port")
}
s, err = ListenSSH(":0", config)
s, err = ListenSSH("localhost:0", config)
if err != nil {
t.Error(err)
}
@@ -29,7 +29,7 @@ func TestServeTerminals(t *testing.T) {
config := MakeNoAuth()
config.AddHostKey(signer)
s, err := ListenSSH(":0", config)
s, err := ListenSSH("localhost:0", config)
if err != nil {
t.Fatal(err)
}