mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
e2e: test watch command with 2 args
This commit is contained in:
parent
624d5eb0cb
commit
7eaf73d273
@ -45,21 +45,26 @@ func watchTest(cx ctlCtx) {
|
|||||||
|
|
||||||
wkv []kv
|
wkv []kv
|
||||||
}{
|
}{
|
||||||
{
|
{ // watch 1 key
|
||||||
[]kv{{"sample", "value"}},
|
[]kv{{"sample", "value"}},
|
||||||
[]string{"sample", "--rev", "1"},
|
[]string{"sample", "--rev", "1"},
|
||||||
[]kv{{"sample", "value"}},
|
[]kv{{"sample", "value"}},
|
||||||
},
|
},
|
||||||
{
|
{ // watch 3 keys by prefix
|
||||||
[]kv{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}},
|
[]kv{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}},
|
||||||
[]string{"key", "--rev", "1", "--prefix"},
|
[]string{"key", "--rev", "1", "--prefix"},
|
||||||
[]kv{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}},
|
[]kv{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}},
|
||||||
},
|
},
|
||||||
{
|
{ // watch by revision
|
||||||
[]kv{{"etcd", "revision_1"}, {"etcd", "revision_2"}, {"etcd", "revision_3"}},
|
[]kv{{"etcd", "revision_1"}, {"etcd", "revision_2"}, {"etcd", "revision_3"}},
|
||||||
[]string{"etcd", "--rev", "2"},
|
[]string{"etcd", "--rev", "2"},
|
||||||
[]kv{{"etcd", "revision_2"}, {"etcd", "revision_3"}},
|
[]kv{{"etcd", "revision_2"}, {"etcd", "revision_3"}},
|
||||||
},
|
},
|
||||||
|
{ // watch 3 keys by range
|
||||||
|
[]kv{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}},
|
||||||
|
[]string{"key", "key3", "--rev", "1"},
|
||||||
|
[]kv{{"key1", "val1"}, {"key2", "val2"}},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, tt := range tests {
|
for i, tt := range tests {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user