summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-1113476.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/bug-1113476.t')
-rw-r--r--tests/bugs/bug-1113476.t44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/bugs/bug-1113476.t b/tests/bugs/bug-1113476.t
new file mode 100644
index 00000000000..7cb9d908269
--- /dev/null
+++ b/tests/bugs/bug-1113476.t
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+. $(dirname $0)/../snapshot.rc
+
+function volinfo_validate ()
+{
+ local var=$1
+ $CLI volume info $V0 | grep "^$var" | sed 's/.*: //'
+}
+
+cleanup;
+
+TEST verify_lvm_version
+TEST glusterd
+TEST pidof glusterd
+TEST setup_lvm 1
+
+TEST $CLI volume create $V0 $H0:$L1
+TEST $CLI volume start $V0
+
+EXPECT '' volinfo_validate 'snap-max-hard-limit'
+EXPECT '' volinfo_validate 'snap-max-soft-limit'
+EXPECT '' volinfo_validate 'auto-delete'
+
+TEST $CLI snapshot config snap-max-hard-limit 100
+EXPECT '100' volinfo_validate 'snap-max-hard-limit'
+EXPECT '' volinfo_validate 'snap-max-soft-limit'
+EXPECT '' volinfo_validate 'auto-delete'
+
+TEST $CLI snapshot config snap-max-soft-limit 50
+EXPECT '100' volinfo_validate 'snap-max-hard-limit'
+EXPECT '50' volinfo_validate 'snap-max-soft-limit'
+EXPECT '' volinfo_validate 'auto-delete'
+
+TEST $CLI snapshot config auto-delete enable
+EXPECT '100' volinfo_validate 'snap-max-hard-limit'
+EXPECT '50' volinfo_validate 'snap-max-soft-limit'
+EXPECT 'enable' volinfo_validate 'auto-delete'
+
+cleanup;
+
+