소스 검색

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

tobz 12 년 전
부모
커밋
0cacb6cba4
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  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.