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
|
ch <- true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(ch)
|
//close(ch)
|
||||||
}()
|
}()
|
||||||
return ch
|
return ch
|
||||||
}
|
}
|
||||||
|
|||||||
2
etcd.go
2
etcd.go
@@ -135,7 +135,7 @@ func EtcdWatch(kapi etcd.KeysAPI) chan etcdMsg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // end for loop
|
} // end for loop
|
||||||
close(ch)
|
//close(ch)
|
||||||
}(ch) // call go routine
|
}(ch) // call go routine
|
||||||
return ch
|
return ch
|
||||||
}
|
}
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -111,7 +111,7 @@ func run(c *cli.Context) {
|
|||||||
case etcdStart, etcdEvent:
|
case etcdStart, etcdEvent:
|
||||||
// pass
|
// pass
|
||||||
default:
|
default:
|
||||||
log.Fatal("Etcd: Unhandled message: %v", msg)
|
log.Fatal("Etcd: Unhandled message: ", msg)
|
||||||
}
|
}
|
||||||
case msg := <-configchan:
|
case msg := <-configchan:
|
||||||
if c.Bool("no-watch") || !msg {
|
if c.Bool("no-watch") || !msg {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ func (obj *ServiceType) Watch() {
|
|||||||
|
|
||||||
bus, err := dbus.SystemBus()
|
bus, err := dbus.SystemBus()
|
||||||
if err != nil {
|
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?
|
// 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-gofmt.sh
|
||||||
./test/test-yamlfmt.sh
|
./test/test-yamlfmt.sh
|
||||||
go test
|
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
|
# 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
|
||||||
#go test -race ./pgraph
|
echo running go vet
|
||||||
|
go vet && echo PASS
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user