Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

Commit c4905f2

Browse files
committed
Switch from gpm -> dep for dependency management
1 parent 363a0dd commit c4905f2

8 files changed

+182
-34
lines changed

.gitignore

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
google_auth_proxy
21
oauth2_proxy
2+
vendor
3+
dist
4+
.godeps
5+
*.exe
6+
7+
38
# Go.gitignore
49
# Compiled Object files, Static and Dynamic libs (Shared Objects)
510
*.o
@@ -22,9 +27,5 @@ _cgo_export.*
2227

2328
_testmain.go
2429

25-
*.exe
26-
dist
27-
.godeps
28-
2930
# Editor swap/temp files
3031
.*.swp

.travis.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: go
22
go:
3-
- 1.7.5
4-
- 1.8.1
3+
- 1.8.x
4+
- 1.9.x
55
script:
6-
- curl -s https://raw.githubusercontent.com/pote/gpm/v1.4.0/bin/gpm > gpm
7-
- chmod +x gpm
8-
- ./gpm install
6+
- wget -O dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64
7+
- chmod +x dep
8+
- ./dep ensure
99
- ./test.sh
1010
sudo: false
1111
notifications:

Godeps

-13
This file was deleted.

Gopkg.lock

+117
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
3+
# for detailed Gopkg.toml documentation.
4+
#
5+
6+
[[constraint]]
7+
name = "github.com/18F/hmacauth"
8+
version = "~1.0.1"
9+
10+
[[constraint]]
11+
name = "github.com/BurntSushi/toml"
12+
version = "~0.3.0"
13+
14+
[[constraint]]
15+
name = "github.com/bitly/go-simplejson"
16+
version = "~0.5.0"
17+
18+
[[constraint]]
19+
branch = "v2"
20+
name = "github.com/coreos/go-oidc"
21+
22+
[[constraint]]
23+
branch = "master"
24+
name = "github.com/mreiferson/go-options"
25+
26+
[[constraint]]
27+
name = "github.com/stretchr/testify"
28+
version = "~1.1.4"
29+
30+
[[constraint]]
31+
branch = "master"
32+
name = "golang.org/x/oauth2"
33+
34+
[[constraint]]
35+
branch = "master"
36+
name = "google.golang.org/api"
37+
38+
[[constraint]]
39+
name = "gopkg.in/fsnotify.v1"
40+
version = "~1.2.0"

test.sh

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#!/bin/bash
2-
set -e
3-
2+
EXIT_CODE=0
43
echo "gofmt"
5-
diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./.godeps/*"))
6-
echo "go vet"
7-
go vet ./...
8-
echo "go test"
9-
go test -timeout 60s ./...
10-
echo "go test -race"
11-
GOMAXPROCS=4 go test -timeout 60s -race ./...
4+
diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./vendor/*")) || EXIT_CODE=1
5+
for pkg in $(go list ./... | grep -v '/vendor/' ); do
6+
echo "testing $pkg"
7+
echo "go vet $pkg"
8+
go vet "$pkg" || EXIT_CODE=1
9+
echo "go test -v $pkg"
10+
go test -v -timeout 90s "$pkg" || EXIT_CODE=1
11+
echo "go test -v -race $pkg"
12+
GOMAXPROCS=4 go test -v -timeout 90s0s -race "$pkg" || EXIT_CODE=1
13+
done
14+
exit $EXIT_CODE

validator_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func NewValidatorTest(t *testing.T) *ValidatorTest {
2020
if err != nil {
2121
t.Fatal("failed to create temp file: " + err.Error())
2222
}
23-
vt.done = make(chan bool)
23+
vt.done = make(chan bool, 1)
2424
return vt
2525
}
2626

validator_watcher_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func TestValidatorOverwriteEmailListViaRenameAndReplace(t *testing.T) {
8686

8787
vt.WriteEmails(t, []string{"[email protected]"})
8888
domains := []string(nil)
89-
updated := make(chan bool)
89+
updated := make(chan bool, 1)
9090
validator := vt.NewValidator(domains, updated)
9191

9292
if !validator("[email protected]") {

0 commit comments

Comments
 (0)