Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have travis fail tests if go fmt makes any changes #159

Merged
merged 4 commits into from
Sep 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
language: go

sudo: false

go:
- 1.4

Expand All @@ -14,8 +16,11 @@ install:
- go get -t github.com/smartystreets/goconvey
- go get -v -u github.com/tools/godep

# Travis auto execute go test
# - go test -v ./...
# Tests should fail if go fmt is required
script:
- '[[ -z "$(go fmt ./... | tee -a /dev/stderr)" ]]'
- go vet ./...
- go test -v ./...

notifications:
email: false
2 changes: 1 addition & 1 deletion configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func setValueFromEnv(field *string, envVar string) {
func setBoolValueFromEnv(field *bool, envVar string) {
env := os.Getenv(envVar)
if len(env) > 0 {
log.Printf("Using environment override %s=%t", envVar, env)
log.Printf("Using environment override %s=%s", envVar, env)
x, err := strconv.ParseBool(env)
if err != nil {
log.Printf("Error converting boolean value: %s\n", err)
Expand Down
1 change: 0 additions & 1 deletion services/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func All(conn *zk.Conn, zkConf conf.Zookeeper) (map[string]Service, error) {
bite, _, e := conn.Get(zkConf.Path + "/" + childPath)
if e != nil {
return nil, e
break
}
appId, _ := unescapeSlashes(childPath)
services[appId] = Service{Id: appId, Acl: string(bite)}
Expand Down