Fix up go vet errors and integrate with ci
This commit is contained in:
@@ -149,7 +149,7 @@ func ConfigWatch(file string) chan bool {
|
||||
ch <- true
|
||||
}
|
||||
}
|
||||
close(ch)
|
||||
//close(ch)
|
||||
}()
|
||||
return ch
|
||||
}
|
||||
|
||||
2
etcd.go
2
etcd.go
@@ -135,7 +135,7 @@ func EtcdWatch(kapi etcd.KeysAPI) chan etcdMsg {
|
||||
}
|
||||
|
||||
} // end for loop
|
||||
close(ch)
|
||||
//close(ch)
|
||||
}(ch) // call go routine
|
||||
return ch
|
||||
}
|
||||
|
||||
2
main.go
2
main.go
@@ -111,7 +111,7 @@ func run(c *cli.Context) {
|
||||
case etcdStart, etcdEvent:
|
||||
// pass
|
||||
default:
|
||||
log.Fatal("Etcd: Unhandled message: %v", msg)
|
||||
log.Fatal("Etcd: Unhandled message: ", msg)
|
||||
}
|
||||
case msg := <-configchan:
|
||||
if c.Bool("no-watch") || !msg {
|
||||
|
||||
@@ -71,7 +71,7 @@ func (obj *ServiceType) Watch() {
|
||||
|
||||
bus, err := dbus.SystemBus()
|
||||
if err != nil {
|
||||
log.Fatal("Failed to connect to bus: %v\n", err)
|
||||
log.Fatal("Failed to connect to bus: ", err)
|
||||
}
|
||||
|
||||
// XXX: will this detect new units?
|
||||
|
||||
8
test.sh
8
test.sh
@@ -13,10 +13,12 @@ diff <(tail -n +$start AUTHORS | sort) <(tail -n +$start AUTHORS)
|
||||
./test/test-gofmt.sh
|
||||
./test/test-yamlfmt.sh
|
||||
go test
|
||||
#go test ./pgraph
|
||||
echo running go vet # since it doesn't output an ok message on pass
|
||||
go vet && echo PASS
|
||||
|
||||
# do these longer tests only when running on ci
|
||||
if env | grep -q '^TRAVIS=true$'; then
|
||||
if env | grep -q -e '^TRAVIS=true$' -e '^JENKINS_URL='; then
|
||||
go test -race
|
||||
#go test -race ./pgraph
|
||||
echo running go vet
|
||||
go vet && echo PASS
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user