summaryrefslogtreecommitdiffstats
path: root/tests/basic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic')
-rwxr-xr-xtests/basic/ec/quota.t1
-rwxr-xr-xtests/basic/quota-ancestry-building.t1
-rwxr-xr-xtests/basic/quota-anon-fd-nfs.t1
-rwxr-xr-xtests/basic/quota-nfs.t1
-rwxr-xr-xtests/basic/quota.t6
-rwxr-xr-xtests/basic/quota_aux_mount.t53
6 files changed, 53 insertions, 10 deletions
diff --git a/tests/basic/ec/quota.t b/tests/basic/ec/quota.t
index b023240b87e..c9612c8b76a 100755
--- a/tests/basic/ec/quota.t
+++ b/tests/basic/ec/quota.t
@@ -40,7 +40,6 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "8.0MB" quotausage "/test"
TEST rm $M0/test/file2.txt
EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" quotausage "/test"
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota-ancestry-building.t b/tests/basic/quota-ancestry-building.t
index f8c508261f9..fcb39ee31f5 100755
--- a/tests/basic/quota-ancestry-building.t
+++ b/tests/basic/quota-ancestry-building.t
@@ -65,7 +65,6 @@ exec 5>&-
exec 6>&-
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota-anon-fd-nfs.t b/tests/basic/quota-anon-fd-nfs.t
index ebb73be966d..11fbe49c7ff 100755
--- a/tests/basic/quota-anon-fd-nfs.t
+++ b/tests/basic/quota-anon-fd-nfs.t
@@ -108,7 +108,6 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
sleep 3
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index 74fde400bd1..663a8da90ad 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -58,7 +58,6 @@ TEST rm -f $N0/$deep/newfile_2
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota.t b/tests/basic/quota.t
index 17d571060e1..7f8b21de6f8 100755
--- a/tests/basic/quota.t
+++ b/tests/basic/quota.t
@@ -40,12 +40,8 @@ EXPECT 'on' volinfo_field $V0 'features.quota'
EXPECT 'on' volinfo_field $V0 'features.inode-quota'
EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs'
-#Wait for the auxiliarymount to come up
-sleep 3
TEST $CLI volume quota $V0 limit-usage /test_dir 100MB
-# Checking for auxiliary mount
-EXPECT "0" get_aux
TEST $CLI volume quota $V0 limit-usage /test_dir/in_test_dir 150MB
@@ -231,9 +227,7 @@ EXPECT 'off' volinfo_field $V0 'features.quota'
EXPECT 'off' volinfo_field $V0 'features.inode-quota'
EXPECT '' volinfo_field $V0 'features.quota-deem-statfs'
-# aux mount should be removed
TEST $CLI volume stop $V0;
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota_aux_mount.t b/tests/basic/quota_aux_mount.t
new file mode 100755
index 00000000000..78d7f47e373
--- /dev/null
+++ b/tests/basic/quota_aux_mount.t
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+
+cleanup;
+
+##-------------------------------------------------------------
+## Tests to verify that aux mount is unmounted after each quota
+## command executes.
+##-------------------------------------------------------------
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume info;
+
+TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4};
+
+EXPECT "$V0" volinfo_field $V0 'Volume Name';
+EXPECT 'Created' volinfo_field $V0 'Status';
+EXPECT '4' brick_count $V0
+
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+
+TEST $GFS -s $H0 --volfile-id $V0 $M0;
+
+TEST mkdir -p $M0/test_dir/
+
+TEST $CLI volume quota $V0 enable
+EXPECT 'on' volinfo_field $V0 'features.quota'
+EXPECT 'on' volinfo_field $V0 'features.inode-quota'
+
+TEST $CLI volume quota $V0 limit-usage /test_dir 150MB
+EXPECT "1" get_limit_aux
+TEST $CLI volume quota $V0 limit-objects /test_dir 10
+EXPECT "1" get_limit_aux
+EXPECT "150.0MB" quota_hard_limit "/test_dir";
+EXPECT "1" get_list_aux
+EXPECT "10" quota_object_hard_limit "/test_dir";
+EXPECT "1" get_list_aux
+
+TEST $CLI volume quota $V0 remove /test_dir/
+EXPECT "1" get_limit_aux
+TEST $CLI volume quota $V0 remove-objects /test_dir
+EXPECT "1" get_limit_aux
+
+TEST $CLI volume quota $V0 disable
+
+TEST $CLI volume stop $V0;
+
+cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=1447344