summaryrefslogtreecommitdiffstats
path: root/tests/basic/pump.t
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-01-29 22:58:42 +0530
committerAnand Avati <avati@redhat.com>2013-02-03 11:37:44 -0800
commitf0724402d19e339ab58680d6135a91801606f4d0 (patch)
treef01bd6af46f3168634f281e528ff3e668a0fc9c1 /tests/basic/pump.t
parent5fa1ebe63611759d30d9dec7bd54c879d5e1e420 (diff)
Tests: Basic pump test case
Change-Id: I94666debd5ec271ce5404a77efc421c12928e134 BUG: 857549 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4451 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/basic/pump.t')
-rw-r--r--tests/basic/pump.t44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/basic/pump.t b/tests/basic/pump.t
new file mode 100644
index 000000000..3faf06f05
--- /dev/null
+++ b/tests/basic/pump.t
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+
+cleanup;
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume create $V0 $H0:$B0/${V0}0
+TEST $CLI volume start $V0
+TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
+cd $M0
+for i in {1..3}
+do
+ for j in {1..10}
+ do
+ dd if=/dev/urandom of=file$j bs=128K count=10 2>/dev/null 1>/dev/null
+ done
+ mkdir dir$i && cd dir$i
+done
+cd
+TEST umount $M0
+TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 start
+EXPECT_WITHIN 60 "Y" gd_is_replace_brick_completed $H0 $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1
+TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 commit
+TEST $CLI volume stop $V0
+TEST diff -r --exclude=.glusterfs $B0/${V0}0 $B0/${V0}1
+
+files=""
+
+cd $B0/${V0}0
+for f in `find . -path ./.glusterfs -prune -o -print`;
+do
+ if [ -d $f ]; then continue; fi
+ cmp $f $B0/${V0}1/$f
+ if [ $? -ne 0 ]; then
+ files="$files $f"
+ fi
+done
+
+EXPECT "" echo $files
+
+cleanup