mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 23:27:17 +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:
|
install:
|
||||||
- go get -t ./...
|
- go get -t ./...
|
||||||
- go get github.com/golang/lint/golint
|
|
||||||
- go get github.com/gordonklaus/ineffassign
|
- go get github.com/gordonklaus/ineffassign
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- diff <(echo -n) <(gofmt -s -d .)
|
|
||||||
- ineffassign .
|
- ineffassign .
|
||||||
- go vet $(go list ./... | grep -v /vendor/)
|
- go vet $(go list ./... | grep -v /vendor/)
|
||||||
- go test $(go list ./... | grep -v /vendor/)
|
- go test -v $(go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
after_script:
|
|
||||||
- golint ./...
|
|
||||||
|
@ -51,7 +51,7 @@ func TestHostNameCollision(t *testing.T) {
|
|||||||
config := sshd.MakeNoAuth()
|
config := sshd.MakeNoAuth()
|
||||||
config.AddHostKey(key)
|
config.AddHostKey(key)
|
||||||
|
|
||||||
s, err := sshd.ListenSSH(":0", config)
|
s, err := sshd.ListenSSH("localhost:0", config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ func TestHostWhitelist(t *testing.T) {
|
|||||||
config := sshd.MakeAuth(auth)
|
config := sshd.MakeAuth(auth)
|
||||||
config.AddHostKey(key)
|
config.AddHostKey(key)
|
||||||
|
|
||||||
s, err := sshd.ListenSSH(":0", config)
|
s, err := sshd.ListenSSH("localhost:0", config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ func TestHostKick(t *testing.T) {
|
|||||||
config := sshd.MakeAuth(auth)
|
config := sshd.MakeAuth(auth)
|
||||||
config.AddHostKey(key)
|
config.AddHostKey(key)
|
||||||
|
|
||||||
s, err := sshd.ListenSSH(":0", config)
|
s, err := sshd.ListenSSH("localhost:0", config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ func TestClientReject(t *testing.T) {
|
|||||||
config := MakeAuth(RejectAuth{})
|
config := MakeAuth(RejectAuth{})
|
||||||
config.AddHostKey(signer)
|
config.AddHostKey(signer)
|
||||||
|
|
||||||
s, err := ListenSSH(":0", config)
|
s, err := ListenSSH("localhost:0", config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,12 @@ import (
|
|||||||
|
|
||||||
func TestServerInit(t *testing.T) {
|
func TestServerInit(t *testing.T) {
|
||||||
config := MakeNoAuth()
|
config := MakeNoAuth()
|
||||||
s, err := ListenSSH(":badport", config)
|
s, err := ListenSSH("localhost:badport", config)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("should fail on bad port")
|
t.Fatal("should fail on bad port")
|
||||||
}
|
}
|
||||||
|
|
||||||
s, err = ListenSSH(":0", config)
|
s, err = ListenSSH("localhost:0", config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ func TestServeTerminals(t *testing.T) {
|
|||||||
config := MakeNoAuth()
|
config := MakeNoAuth()
|
||||||
config.AddHostKey(signer)
|
config.AddHostKey(signer)
|
||||||
|
|
||||||
s, err := ListenSSH(":0", config)
|
s, err := ListenSSH("localhost:0", config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user