[sheepdog] [PATCH v2] tests/functional: fixed wrong error message

Kai Zhang kyle at zelin.io
Wed Jun 19 14:03:54 CEST 2013


v2:
- fixed indention error

Signed-off-by: Kai Zhang <kyle at zelin.io>
---
 tests/functional/common.rc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index 88f4c24..1ef9992 100644
--- a/tests/functional/common.rc
+++ b/tests/functional/common.rc
@@ -209,12 +209,13 @@ _wait_for_sheep()
         fi
 
         nr_sheep="$(echo "$node_list" | wc -l)"
+        nr_sheep=$(($nr_sheep-1))
 
-        if [ ${nr_sheep} -eq $(($1+1)) ]; then
+        if [ ${nr_sheep} -eq $1 ]; then
             break
         fi
-        if [ ${nr_sheep} -gt $(($1+1)) ]; then
-            _die "ERROR: too many sheep in cluster: ${nr_sheep}"
+        if [ ${nr_sheep} -gt $1 ]; then
+            _die "ERROR: too many sheep in cluster: ${nr_sheep}, expect: $1"
         fi
     done
 }
--
1.7.9.5




More information about the sheepdog mailing list