Fix bugs in monitor
This commit is contained in:
		| @@ -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() | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user