summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t')
-rwxr-xr-xtests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t b/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t
new file mode 100755
index 00000000000..9f67e4ccfa0
--- /dev/null
+++ b/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+. $(dirname $0)/../../cluster.rc
+
+cleanup;
+
+TEST launch_cluster 4;
+
+TEST $CLI_1 peer probe $H2;
+EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
+TEST $CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0
+TEST $CLI_1 volume start $V0
+
+
+TEST $CLI_1 peer probe $H3;
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
+
+TEST $CLI_1 peer probe $H4;
+EXPECT_WITHIN $PROBE_TIMEOUT 3 peer_count
+
+# peers hosting bricks can't be detached
+TEST ! $CLI_3 peer detach $H1
+TEST ! $CLI_3 peer detach $H2
+
+
+# peer not hosting bricks should be detachable
+TEST $CLI_3 peer detach $H4
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
+cleanup;