Browse Source

test(store): exercise watchers receiving notifications of non-hidden keys within hidden directories

tobz 12 years ago
parent
commit
0cacb6cba4
1 changed files with 7 additions and 0 deletions
  1. 7 0
      store/store_test.go

+ 7 - 0
store/store_test.go

@@ -528,6 +528,13 @@ func TestStoreWatchRecursiveCreateWithHiddenKey(t *testing.T) {
 	s.Create("/foo/_bar", false, "baz", false, Permanent)
 	e := nbselect(w.EventChan)
 	assert.Nil(t, e, "")
+	w, _ = s.Watch("/foo", true, false, 0)
+	s.Create("/foo/_baz", true, "", false, Permanent)
+	e = nbselect(w.EventChan)
+	assert.Nil(t, e, "")
+	s.Create("/foo/_baz/quux", false, "quux", false, Permanent)
+	e = nbselect(w.EventChan)
+	assert.Nil(t, e, "")
 }
 
 // Ensure that the store can watch for key updates.