Skip to content

Commit

Permalink
Switch from gpm -> dep for dependency management
Browse files Browse the repository at this point in the history
  • Loading branch information
jehiah committed Nov 17, 2017
1 parent 363a0dd commit c4905f2
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 34 deletions.
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
google_auth_proxy
oauth2_proxy
vendor
dist
.godeps
*.exe


# Go.gitignore
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
Expand All @@ -22,9 +27,5 @@ _cgo_export.*

_testmain.go

*.exe
dist
.godeps

# Editor swap/temp files
.*.swp
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: go
go:
- 1.7.5
- 1.8.1
- 1.8.x
- 1.9.x
script:
- curl -s https://raw.githubusercontent.com/pote/gpm/v1.4.0/bin/gpm > gpm
- chmod +x gpm
- ./gpm install
- wget -O dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64
- chmod +x dep
- ./dep ensure
- ./test.sh
sudo: false
notifications:
Expand Down
13 changes: 0 additions & 13 deletions Godeps

This file was deleted.

117 changes: 117 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#

[[constraint]]
name = "github.com/18F/hmacauth"
version = "~1.0.1"

[[constraint]]
name = "github.com/BurntSushi/toml"
version = "~0.3.0"

[[constraint]]
name = "github.com/bitly/go-simplejson"
version = "~0.5.0"

[[constraint]]
branch = "v2"
name = "github.com/coreos/go-oidc"

[[constraint]]
branch = "master"
name = "github.com/mreiferson/go-options"

[[constraint]]
name = "github.com/stretchr/testify"
version = "~1.1.4"

[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"

[[constraint]]
branch = "master"
name = "google.golang.org/api"

[[constraint]]
name = "gopkg.in/fsnotify.v1"
version = "~1.2.0"
21 changes: 12 additions & 9 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/bash
set -e

EXIT_CODE=0
echo "gofmt"
diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./.godeps/*"))
echo "go vet"
go vet ./...
echo "go test"
go test -timeout 60s ./...
echo "go test -race"
GOMAXPROCS=4 go test -timeout 60s -race ./...
diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./vendor/*")) || EXIT_CODE=1
for pkg in $(go list ./... | grep -v '/vendor/' ); do
echo "testing $pkg"
echo "go vet $pkg"
go vet "$pkg" || EXIT_CODE=1
echo "go test -v $pkg"
go test -v -timeout 90s "$pkg" || EXIT_CODE=1
echo "go test -v -race $pkg"
GOMAXPROCS=4 go test -v -timeout 90s0s -race "$pkg" || EXIT_CODE=1
done
exit $EXIT_CODE
2 changes: 1 addition & 1 deletion validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewValidatorTest(t *testing.T) *ValidatorTest {
if err != nil {
t.Fatal("failed to create temp file: " + err.Error())
}
vt.done = make(chan bool)
vt.done = make(chan bool, 1)
return vt
}

Expand Down
2 changes: 1 addition & 1 deletion validator_watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestValidatorOverwriteEmailListViaRenameAndReplace(t *testing.T) {

vt.WriteEmails(t, []string{"xyzzy@example.com"})
domains := []string(nil)
updated := make(chan bool)
updated := make(chan bool, 1)
validator := vt.NewValidator(domains, updated)

if !validator("xyzzy@example.com") {
Expand Down

0 comments on commit c4905f2

Please sign in to comment.