summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd/bug-1266818-shared-storage-disable.t
blob: a9ccf1b8954a16e66024ddc1fcc471ea21b736f6 (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
33
34
35
36
#!/bin/bash

## Test case for BZ 1266818;
## Disabling enable-shared-storage option should not delete user created
## volume with name glusterd_shared_storage

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

cleanup;

## Start a 2 node virtual cluster
TEST launch_cluster 2;

## Peer probe server 2 from server 1 cli
TEST $CLI_1 peer probe $H2;

EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count

## Creating a volume with name glusterd_shared_storage
TEST $CLI_1 volume create glusterd_shared_storage  $H1:$B1/${V0}0 $H2:$B1/${V0}1

## Disabling enable-shared-storage should not succeed and should not delete the
## user created volume with name "glusterd_shared_storage"
TEST ! $CLI_1 volume all enable-shared-storage disable

## Volume with name should exist
TEST $CLI_1 volume info glusterd_shared_storage

cleanup;