summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/bug-1155042-dont-display-deactivated-snapshots.t35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs/bug-1155042-dont-display-deactivated-snapshots.t b/tests/bugs/bug-1155042-dont-display-deactivated-snapshots.t
new file mode 100644
index 00000000000..34c068f6713
--- /dev/null
+++ b/tests/bugs/bug-1155042-dont-display-deactivated-snapshots.t
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+. $(dirname $0)/../snapshot.rc
+
+cleanup;
+
+TEST init_n_bricks 2
+TEST setup_lvm 2
+TEST glusterd;
+
+TEST $CLI volume create $V0 $H0:$L1 $H0:$L2
+TEST $CLI volume start $V0
+
+# enable uss and mount the volume
+TEST $CLI volume set $V0 features.uss enable
+TEST $GFS --volfile-server=$H0 --volfile-id=$V0 $M0
+
+# create 10 snapshots and check if all are being reflected
+# in the USS world
+for i in {1..10}; do $CLI snapshot create snap$i $V0; done
+EXPECT 10 uss_count_snap_displayed $M0
+
+# snapshots should not be displayed after deactivation
+for i in {1..10}; do $CLI snapshot deactivate snap$i --mode=script; done
+EXPECT 0 uss_count_snap_displayed $M0
+
+# activate all the snapshots and check if all the activated snapshots
+# are displayed again
+for i in {1..10}; do $CLI snapshot activate snap$i --mode=script; done
+EXPECT 10 uss_count_snap_displayed $M0
+
+cleanup;
+