summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorVijaykumar Koppad <vkoppad@redhat.com>2014-06-13 17:52:30 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-13 10:01:49 +0000
commitb5d7faa96b5ca44be6899c6976691e0fde7d70d1 (patch)
treee2fedcbfdcd0f55afe27f39c65e0c78c796dd34c /tests/volume.rc
parent5cb5d7029216ce71b19fd798a86ef4c384262ba9 (diff)
Geo-rep: Adding regression tests for geo-rep
This patch introduces upstream regression suit for geo-replication * Modifies cleanup (tests/include.rc) to remove everything but hook-scripts. Prerequisites: * Passwordless SSH from root to root of current host. * Export /build/install/sbin and /build/install/bin to PATH variable for root user. Change-Id: I433dd8bbb17edba9baaf516fe0dce3133ba39184 BUG: 1101111 Signed-off-by: Vijaykumar Koppad <vkoppad@redhat.com> Signed-off-by: Ajeet Jha <ajha@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/7392 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index 59a66142e9e..f2a56888fb8 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -474,3 +474,35 @@ function mount_get_option_value {
function get_volume_mark {
getfattr -n trusted.glusterfs.volume-mark -ehex $1 | sed -n 's/^trusted.glusterfs.volume-mark=0x//p' | cut -b5-36 | sed 's/\([a-f0-9]\{8\}\)\([a-f0-9]\{4\}\)\([a-f0-9]\{4\}\)\([a-f0-9]\{4\}\)/\1-\2-\3-\4-/'
}
+
+# setup geo-rep in a single a node.
+
+function setup_georep {
+
+ $CLI volume create $GMV0 replica 2 $H0:$B0/${GMV0}{1,2,3,4};
+
+ $CLI volume start $GMV0
+
+ $CLI volume create $GSV0 replica 2 $H0:$B0/${GSV0}{1,2,3,4};
+
+ $CLI volume start $GSV0
+
+ $CLI system:: execute gsec_create
+
+ $CLI volume geo-rep $GMV0 $H0::$GSV0 create push-pem
+
+ $CLI volume geo-rep $GMV0 $H0::$GSV0 start
+
+ sleep 80 # after start geo-rep takes a minute to get stable
+
+}
+
+
+# stop and delete geo-rep session
+
+function cleanup_georep {
+
+ $CLI volume geo-rep $GMV0 $H0::$GSV0 stop
+
+ $CLI volume geo-rep $GMV0 $H0::$GSV0 delete
+}