Skip to content

Commit 0700d12

Browse files
authored
Run travis tests using govendor (#91)
* Build and test using vendored dependencies * Fix TestDialTLSTimeout test * Remove go get ./... * Add kingpin
1 parent afdbb7c commit 0700d12

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ go:
44
- 1.6.x
55
- 1.7.x
66
- 1.8.x
7+
- 1.9.x
78
- tip
89

910
before_install:
10-
- go get ./...
11+
- go get gopkg.in/alecthomas/kingpin.v2
1112
- go get github.com/axw/gocov/gocov
1213
- go get github.com/mattn/goveralls
1314
- go get github.com/stretchr/testify/assert
15+
- go get github.com/kardianos/govendor
1416
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
1517

1618
install:
17-
- go get golang.org/x/net/http2
18-
- go get golang.org/x/net/context
19-
- go get golang.org/x/crypto/pkcs12
19+
- $HOME/gopath/bin/govendor sync
2020

2121
os:
2222
- linux
2323

2424
script:
25-
- go test -race -v ./...
25+
- $HOME/gopath/bin/govendor test -race -v +local
2626
- $HOME/gopath/bin/goveralls -service=travis-ci

client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func TestClientNameToCertificate(t *testing.T) {
8181
}
8282

8383
func TestDialTLSTimeout(t *testing.T) {
84-
apns.TLSDialTimeout = 1 * time.Millisecond
84+
apns.TLSDialTimeout = 10 * time.Millisecond
8585
crt, _ := certificate.FromP12File("certificate/_fixtures/certificate-valid.p12", "")
8686
client := apns.NewClient(crt)
8787
dialTLS := client.HTTPClient.Transport.(*http2.Transport).DialTLS

0 commit comments

Comments
 (0)