summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic/volume-snapshot-clone.t8
-rwxr-xr-xtests/basic/volume-snapshot.t4
-rw-r--r--tests/snapshot.rc11
-rw-r--r--tests/volume.rc13
4 files changed, 17 insertions, 19 deletions
diff --git a/tests/basic/volume-snapshot-clone.t b/tests/basic/volume-snapshot-clone.t
index b142804e51b..17e51d91a81 100755
--- a/tests/basic/volume-snapshot-clone.t
+++ b/tests/basic/volume-snapshot-clone.t
@@ -98,8 +98,8 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field ${V0}_clone 'Status';
EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field ${V1}_clone 'Status';
#Clean up
stop_force_volumes 2
-EXPECT 'Stopped' volinfo_field $V0 'Status';
-EXPECT 'Stopped' volinfo_field $V1 'Status';
+EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT 'Stopped' volinfo_field $V0 'Status';
+EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT 'Stopped' volinfo_field $V1 'Status';
TEST delete_snapshot ${V0}_snap
TEST delete_snapshot ${V1}_snap
@@ -108,7 +108,7 @@ TEST ! snapshot_exists 1 ${V0}_snap
TEST ! snapshot_exists 1 ${V1}_snap
delete_volumes 2
-TEST ! volume_exists $V0
-TEST ! volume_exists $V1
+EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT "N" volume_exists $V0
+EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT "N" volume_exists $V1
cleanup;
diff --git a/tests/basic/volume-snapshot.t b/tests/basic/volume-snapshot.t
index 65ce54b0a26..7987d4039d3 100755
--- a/tests/basic/volume-snapshot.t
+++ b/tests/basic/volume-snapshot.t
@@ -143,7 +143,7 @@ TEST ! snapshot_exists 1 ${V0}_snap
TEST ! snapshot_exists 1 ${V1}_snap
delete_volumes 2
-TEST ! volume_exists $V0
-TEST ! volume_exists $V1
+EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT "N" volume_exists $V0
+EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT "N" volume_exists $V1
cleanup;
diff --git a/tests/snapshot.rc b/tests/snapshot.rc
index defce075cf5..d5332377ede 100644
--- a/tests/snapshot.rc
+++ b/tests/snapshot.rc
@@ -314,12 +314,11 @@ function volinfo_field()
function volume_exists() {
- local volname=$1
- $CLI_1 volume info $volname 2>&1 | grep -q 'does not exist'
+ $CLI_1 volume info $1 > /dev/null 2>&1
if [ $? -eq 0 ]; then
- return 1
+ echo "Y"
else
- return 0
+ echo "N"
fi
}
@@ -407,6 +406,6 @@ NetBSD)
SKIP_TESTS
exit 0
;;
-*)
+*)
;;
-esac
+esac
diff --git a/tests/volume.rc b/tests/volume.rc
index 741d2b81c15..59a66142e9e 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -402,13 +402,12 @@ function delete_volumes() {
}
function volume_exists() {
- local volname=$1
- $CLI volume info $volname 2>&1 | grep -q 'does not exist'
- if [ $? -eq 0 ]; then
- return 1
- else
- return 0
- fi
+ $CLI volume info $1 > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "Y"
+ else
+ echo "N"
+ fi
}
function afr_get_index_count {