Add extra test case for deleting entire tree with empty prefix
This commit is contained in:
parent
74ba4c3c6b
commit
4692b1478e
|
@ -1107,6 +1107,20 @@ func TestStateStore_Watches_PrefixDelete(t *testing.T) {
|
||||||
if got != wantIndex {
|
if got != wantIndex {
|
||||||
t.Fatalf("bad index: %d, expected %d", got, wantIndex)
|
t.Fatalf("bad index: %d, expected %d", got, wantIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete all the keys, special case where tombstones are not inserted
|
||||||
|
if err := s.KVSDeleteTree(9, ""); err != nil {
|
||||||
|
t.Fatalf("unexpected err: %s", err)
|
||||||
|
}
|
||||||
|
wantIndex = 9
|
||||||
|
got, _, err = s.KVSList(nil, "/foo/bar")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("err: %s", err)
|
||||||
|
}
|
||||||
|
if got != wantIndex {
|
||||||
|
t.Fatalf("bad index: %d, expected %d", got, wantIndex)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestStateStore_KVSLockDelay(t *testing.T) {
|
func TestStateStore_KVSLockDelay(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue