summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-857330/common.rc
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-01-17 18:01:35 +0530
committerAnand Avati <avati@redhat.com>2013-01-17 20:56:28 -0800
commit165044cee54ceaa8f0adec6d571e9ad54f4f8e5d (patch)
tree78f145037dc772e9f49e47351f297123f00be7b0 /tests/bugs/bug-857330/common.rc
parentd177372ee732acc3b2ce7a395d83f8c03ec19ce2 (diff)
tests: Fix tests for bug 857330
Changed some tests to use EXPECT, which I should have done originally, instead of using TEST. With recent changes to the EXPECT primitive we get more info for failures, which hopefully will make debugging of the intermittent failures of these tests easier. Change-Id: If763dcfb7e370a3f360277c3c183b950aede5685 BUG: 857330 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4390 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/bugs/bug-857330/common.rc')
-rw-r--r--tests/bugs/bug-857330/common.rc27
1 files changed, 4 insertions, 23 deletions
diff --git a/tests/bugs/bug-857330/common.rc b/tests/bugs/bug-857330/common.rc
index 40da95e8c33..4e5a73a0bb1 100644
--- a/tests/bugs/bug-857330/common.rc
+++ b/tests/bugs/bug-857330/common.rc
@@ -20,19 +20,10 @@ function check-and-store-task-id()
return 0;
}
-function check-with-stored-task-id()
+function get-task-id()
{
- local task_id=$($CLI $COMMAND | grep $PATTERN | grep -o -E "$UUID_REGEX")
-
- if [ -z "$task_id" ] && [ "${task_id+asdf}" = "asdf" ]; then
- return 1
- fi
+ $CLI $COMMAND | grep $PATTERN | grep -o -E "$UUID_REGEX"
- if [ "$TASK_ID" != "$task_id" ]; then
- return 1
- fi
-
- return 0
}
function check-and-store-task-id-xml()
@@ -49,19 +40,9 @@ function check-and-store-task-id-xml()
return 0;
}
-function check-with-stored-task-id-xml()
+function get-task-id-xml()
{
- local task_id=$($CLI $COMMAND --xml | xmllint --format - | grep $PATTERN | grep -o -E "$UUID_REGEX")
-
- if [ -z "$task_id" ] && [ "${task_id+asdf}" = "asdf" ]; then
- return 1
- fi
-
- if [ "$TASK_ID" != "$task_id" ]; then
- return 1
- fi
-
- return 0
+ $CLI $COMMAND --xml | xmllint --format - | grep $PATTERN | grep -o -E "$UUID_REGEX"
}
function get-task-status()