Fix travisci tests
authorAndrey Petrov <andrey.petrov@shazow.net>
Tue, 2 Aug 2016 20:03:19 +0000 (16:03 -0400)
committerAndrey Petrov <andrey.petrov@shazow.net>
Tue, 2 Aug 2016 20:03:19 +0000 (16:03 -0400)
Bind to localhost rather than all hosts.

.travis.yml
host_test.go
sshd/client_test.go
sshd/net_test.go

index 13d16ff59838ff82ee563583cc644ed7e6c13246..160ea6c9b572b8efe25ec8645f21ddc713aa8fb7 100644 (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/)
index e30dd556d01e4ed2af726c057160e80b11486803..d29a875a2e6af8908259bb0bba6770f5fc03c4e3 100644 (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)
        }
index e99b47e6dc4acb1d5a6c22ffd131ad736d4ef2d0..b2632915c85d8cfd345bd37bc0a48c7af6c124c6 100644 (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)
        }
index 7c6f04fc9fb55215f377dc79e2cadb76ce4ea61f..2ec34d427a13952cc3480f9cf1dedb253c5ce627 100644 (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)
        }