From dace4bbd0fdce567703a1a8d2d74a0a3f166f334 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 28 May 2015 19:26:00 +0530 Subject: tests: New simple geo-rep regression test suite This is a new simple regression test suite for geo-replication. This is written keeping in mind the run time for regression test. The existing regression test suite is rigorous one and could be run nightly. Hence the existing geo-rep tests are being removed as part of this. Also re-enable geo-rep regression with this patch. Thanks Aravinda for initial template and plan. Change-Id: If544ac295eaf67ac66e0b071903cc1096e71d437 BUG: 1227624 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/11058 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Aravinda VK --- tests/geo-rep/georep-basic-dr-rsync.t | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 tests/geo-rep/georep-basic-dr-rsync.t (limited to 'tests/geo-rep/georep-basic-dr-rsync.t') diff --git a/tests/geo-rep/georep-basic-dr-rsync.t b/tests/geo-rep/georep-basic-dr-rsync.t new file mode 100644 index 00000000000..7562a206f2a --- /dev/null +++ b/tests/geo-rep/georep-basic-dr-rsync.t @@ -0,0 +1,89 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc +. $(dirname $0)/../geo-rep.rc + +### Basic Tests with Distribute Replicate volumes + +##Cleanup and start glusterd +cleanup; +TEST glusterd; +TEST pidof glusterd + + +##Variables +GEOREP_CLI="$CLI volume geo-replication" +master=$GMV0 +slave=${H0}::${GSV0} +num_active=2 +num_passive=2 +master_mnt=$M0 +slave_mnt=$M1 + +############################################################ +#SETUP VOLUMES AND GEO-REPLICATION +############################################################ + +##create_and_start_master_volume +TEST $CLI volume create $GMV0 replica 2 $H0:$B0/${GMV0}{1,2,3,4}; +TEST $CLI volume start $GMV0 + +##create_and_start_slave_volume +TEST $CLI volume create $GSV0 replica 2 $H0:$B0/${GSV0}{1,2,3,4}; #5 +TEST $CLI volume start $GSV0 + +##Create, start and mount meta_volume +TEST $CLI volume create $META_VOL replica 3 $H0:$B0/${META_VOL}{1,2,3}; +TEST $CLI volume start $META_VOL +TEST mkdir -p $META_MNT +TEST glusterfs -s $H0 --volfile-id $META_VOL $META_MNT #10 + +##Mount master +TEST glusterfs -s $H0 --volfile-id $GMV0 $M0 + +##Mount slave +TEST glusterfs -s $H0 --volfile-id $GSV0 $M1 + +############################################################ +#BASIC GEO-REPLICATION TESTS +############################################################ + +#Check Hybrid Crawl +TEST create_data "hybrid" +TEST create_georep_session $master $slave +EXPECT 4 check_status_num_rows "Created" #15 + +#Enable_metavolume +TEST $GEOREP_CLI $master $slave config use_meta_volume true + +#Start_georep +TEST $GEOREP_CLI $master $slave start + +sleep 10 +EXPECT 2 check_status_num_rows "Active" +EXPECT 2 check_status_num_rows "Passive" +TEST data_tests "hybrid" #20 + +#Check History Crawl. +TEST $GEOREP_CLI $master $slave stop +TEST create_data "history" +TEST $GEOREP_CLI $master $slave start +sleep 10 +EXPECT 2 check_status_num_rows "Active" +EXPECT 2 check_status_num_rows "Passive" #25 +TEST data_tests "history" + +#Check History Crawl. +TEST create_data "changelog" +sleep 15 +TEST check_status "Changelog Crawl" +TEST data_tests "changelog" + +#Stop Geo-rep +TEST $GEOREP_CLI $master $slave stop #30 + +#Delete Geo-rep +TEST $GEOREP_CLI $master $slave delete + +cleanup; -- cgit