summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarak Sason Rofman <sason922@gmail.com>2020-04-12 13:50:33 +0300
committerMOHIT AGRAWAL <moagrawa@redhat.com>2020-04-13 05:28:08 +0000
commitd357863f4fc5be09b96ef3b359100d741efc0b4f (patch)
tree112971d8cc5e46791f6d5cc29342ccad943cff77
parentcd77bddacb4eefb8c447c82220780626b878c3f0 (diff)
test: Fix test "bug-1064148" to pass in mux
Parts of the test weren't designed to run in mux mode, this is now fixed Change-Id: I428c2fcce6d047e324ca5dcaef677ee1794e3dfe updates: #1154 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
-rwxr-xr-xtests/bugs/bug-1064147.t21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/bugs/bug-1064147.t b/tests/bugs/bug-1064147.t
index 617a1aa90e3..27ffde4eb44 100755
--- a/tests/bugs/bug-1064147.t
+++ b/tests/bugs/bug-1064147.t
@@ -13,22 +13,23 @@ TEST pidof glusterd;
TEST $CLI volume info;
# Create a volume
-TEST $CLI volume create $V0 $H0:/${V0}{1,2};
+TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2}
# Verify volume creation
- EXPECT "$V0" volinfo_field $V0 'Volume Name';
- EXPECT 'Created' volinfo_field $V0 'Status';
+EXPECT "$V0" volinfo_field $V0 'Volume Name';
+EXPECT 'Created' volinfo_field $V0 'Status';
# Start volume and verify successful start
- TEST $CLI volume start $V0;
- EXPECT 'Started' volinfo_field $V0 'Status';
- TEST glusterfs -s $H0 --volfile-id=$V0 $M0
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 --entry-timeout=0 $M0;
#------------------------------------------------------------
# Test case 1 - Subvolume down + Healing
#------------------------------------------------------------
# Kill 2nd brick process
-TEST kill -9 `ps aux | grep glusterfsd | grep ${V0}2 | grep -v grep | awk '{print $2}'`;
+TEST kill_brick $V0 $H0 $B0/${V0}2
+EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "1" online_brick_count
# Change root permissions
TEST chmod 444 $M0
@@ -44,7 +45,7 @@ sleep 5
TEST ls $M0
# Check brick permissions
-TEST brick_perm=`stat -c "%A" /${V0}2`
+TEST brick_perm=`stat -c "%A" $B0/${V0}2`
TEST [ ${brick_perm} = ${permission_new} ]
#------------------------------------------------------------
@@ -57,14 +58,14 @@ TEST chmod 777 $M0
TEST permission_new_2=`stat -c "%A" $M0`
# Add a 3rd brick
-TEST $CLI volume add-brick $V0 $H0:/${V0}3
+TEST $CLI volume add-brick $V0 $H0:$B0/${V0}3
# Perform lookup
sleep 5
TEST ls $M0
# Check permissions on the new brick
-TEST brick_perm2=`stat -c "%A" /${V0}3`
+TEST brick_perm2=`stat -c "%A" $B0/${V0}3`
TEST [ ${brick_perm2} = ${permission_new_2} ]