diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/bugs/quota/bug-1288474.t | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/bugs/quota/bug-1288474.t b/tests/bugs/quota/bug-1288474.t new file mode 100755 index 00000000000..2ead6ef4d74 --- /dev/null +++ b/tests/bugs/quota/bug-1288474.t @@ -0,0 +1,48 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc +. $(dirname $0)/../../tier.rc + +NUM_BRICKS=2 + +function create_dist_tier_vol () { + mkdir $B0/cold + mkdir $B0/hot + TEST $CLI volume create $V0 $H0:$B0/cold/${V0}{0..$1} + TEST $CLI volume start $V0 + TEST $CLI volume tier $V0 attach $H0:$B0/hot/${V0}{0..$1} +} + +cleanup; + +#Basic checks +TEST glusterd +TEST pidof glusterd +TEST $CLI volume info + +#Create and start a tiered volume +create_dist_tier_vol $NUM_BRICKS + +TEST $CLI volume quota $V0 enable +TEST $CLI volume quota $V0 limit-usage / 10MB + +EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "10.0MB" quota_list_field "/" 5 + +#check quota list after detach tier +TEST $CLI volume detach-tier $V0 start +sleep 1 +TEST $CLI volume detach-tier $V0 force +EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "10.0MB" quota_list_field "/" 5 + +#check quota list after attach tier +rm -rf $B0/hot +mkdir $B0/hot +TEST $CLI volume tier $V0 attach $H0:$B0/hot/${V0}{0..$1} +EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "10.0MB" quota_list_field "/" 5 + +TEST $CLI volume stop $V0 +TEST $CLI volume delete $V0 + +cleanup; + |