summaryrefslogtreecommitdiffstats
path: root/tests/bugs/quota/bug-1293601.t
blob: 52b03bcc0595b5e9efc4cda076a7e8dfc55e8812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash

. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc

cleanup;

TEST glusterd

TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4}
TEST $CLI volume start $V0
TEST $CLI volume quota $V0 enable

TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0;

for i in {1..512}; do
    dd if=/dev/zero of=$M0/f$i bs=1k count=1
done

mkdir $M0/dir1
for i in {513..1024}; do
    dd if=/dev/zero of=$M0/dir1/f$i bs=1k count=1
done

EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "1.0MB" quotausage "/"

TEST $CLI volume quota $V0 disable
TEST $CLI volume quota $V0 enable

EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "1.0MB" quotausage "/"

cleanup;