From 7eaf73d273856cce1e39e769535ad6bf3506a1ee Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 7 Jun 2016 16:31:47 -0700 Subject: [PATCH] e2e: test watch command with 2 args --- e2e/ctl_v3_watch_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/e2e/ctl_v3_watch_test.go b/e2e/ctl_v3_watch_test.go index fc97033a0..6b7326d92 100644 --- a/e2e/ctl_v3_watch_test.go +++ b/e2e/ctl_v3_watch_test.go @@ -45,21 +45,26 @@ func watchTest(cx ctlCtx) { wkv []kv }{ - { + { // watch 1 key []kv{{"sample", "value"}}, []string{"sample", "--rev", "1"}, []kv{{"sample", "value"}}, }, - { + { // watch 3 keys by prefix []kv{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}}, []string{"key", "--rev", "1", "--prefix"}, []kv{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}}, }, - { + { // watch by revision []kv{{"etcd", "revision_1"}, {"etcd", "revision_2"}, {"etcd", "revision_3"}}, []string{"etcd", "--rev", "2"}, []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 {