handle watch errors everywhere

This commit is contained in:
Daniel Smith
2014-09-22 17:37:12 -07:00
parent 8fd1fb4337
commit f211e46f20
6 changed files with 47 additions and 14 deletions

View File

@@ -101,10 +101,7 @@ func TestWatch(t *testing.T) {
expectedVersion := resp.Node.ModifiedIndex
// watch should load the object at the current index
w, err := helper.Watch(key, 0)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
w := helper.Watch(key, 0)
event := <-w.ResultChan()
if event.Type != watch.Added || event.Object == nil {
t.Fatalf("expected first value to be set to ADDED, got %#v", event)