diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2015-01-13 11:40:03 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-01-13 06:17:53 -0800 |
commit | e9c90da38e1b6fb7fc4e0d5d1e987c510d1c17d6 (patch) | |
tree | 598a6e731313b28b1cf2b4ced45276b0673ecb22 /tests/bugs/snapshot/bug-1112559.t | |
parent | 015282013a22dda84d1849e18659d42bb5bb48f4 (diff) |
tests: move all snapshot test cases from glusterd to snapshot component
Change-Id: Id04037a38e80fe9b400678cfe6bc731cdefae834
BUG: 1178685
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/9437
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/bugs/snapshot/bug-1112559.t')
-rwxr-xr-x | tests/bugs/snapshot/bug-1112559.t | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/bugs/snapshot/bug-1112559.t b/tests/bugs/snapshot/bug-1112559.t new file mode 100755 index 00000000000..f318db61b8a --- /dev/null +++ b/tests/bugs/snapshot/bug-1112559.t @@ -0,0 +1,61 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../cluster.rc +. $(dirname $0)/../../volume.rc +. $(dirname $0)/../../snapshot.rc + +function check_peers { + $CLI_1 peer status | grep 'Peer in Cluster (Connected)' | wc -l +} + +function check_snaps_status { + $CLI_1 snapshot status | grep 'Snap Name : ' | wc -l +} + +function check_snaps_bricks_health { + $CLI_1 snapshot status | grep 'Brick Running : Yes' | wc -l +} + + +SNAP_COMMAND_TIMEOUT=40 +NUMBER_OF_BRICKS=2 + +cleanup; +TEST verify_lvm_version +TEST launch_cluster 3 +TEST setup_lvm 3 + +TEST $CLI_1 peer probe $H2 +EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count + +TEST $CLI_1 volume create $V0 $H1:$L1 $H2:$L2 + +TEST $CLI_1 volume start $V0 + +#Create snapshot and add a peer together +$CLI_1 snapshot create ${V0}_snap1 ${V0} & +PID_1=$! +$CLI_1 peer probe $H3 +wait $PID_1 + +#Snapshot should be created and in the snaplist +TEST snapshot_exists 1 ${V0}_snap1 + +#Not being paranoid! Just checking for the status of the snapshot +#During the testing of the bug the snapshot would list but actually +#not be created.Therefore check for health of the snapshot +EXPECT_WITHIN $SNAP_COMMAND_TIMEOUT 1 check_snaps_status + +#Disabling the checking of snap brick status , Will continue investigation +#on the failure of the snapbrick port bind issue. +#EXPECT_WITHIN $SNAP_COMMAND_TIMEOUT $NUMBER_OF_BRICKS check_snaps_bricks_health + +#check if the peer is added successfully +EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count + +TEST $CLI_1 snapshot delete ${V0}_snap1 + +cleanup; + + |