diff options
Diffstat (limited to 'test/scripts/testutils.sh')
-rw-r--r-- | test/scripts/testutils.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/scripts/testutils.sh b/test/scripts/testutils.sh index d264464..faa7026 100644 --- a/test/scripts/testutils.sh +++ b/test/scripts/testutils.sh @@ -9,6 +9,16 @@ assert_equal() { test "$2" = "$3" || fail "$1 $2 != expected $3" } +wait_for_equal() { + n=$4 + while [ $n -gt 0 ]; do + [ $(eval "$2") = "$3" ] && return + n=$((n-1)) + sleep 1 + done + assert_equal "$1" "$(eval "$2")" "$3" +} + get_treesize() { ${top_srcdir}/tools/loginfo.py --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg --treesize https://localhost:8080/ } |