Fix bugs in monitor

This commit is contained in:
Asim Aslam
2019-08-06 18:05:05 +01:00
parent 3adce58eb2
commit 91f2af91de
2 changed files with 15 additions and 2 deletions

View File

@@ -12,8 +12,20 @@ func TestMonitor(t *testing.T) {
for _, service := range services {
_, err := m.Status(service)
if err != nil {
if err == nil {
t.Fatal("expected status error for unknown service")
}
if err := m.Watch(service); err == nil {
t.Fatal("expected watch error for unknown service")
}
// TODO:
// 1. start a service
// 2. watch service
// 3. get service status
}
// stop monitor
m.Stop()
}