mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 15:17:16 +03:00
Fix travisci tests
Bind to localhost rather than all hosts.
This commit is contained in:
parent
58e1cb60bd
commit
1662ecd431
@ -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/)
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user