summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-1045333.t
blob: c1fd71beb2e48e0cba0001987665a98904b39118 (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
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash

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

cleanup;
TEST glusterd;
TEST pidof glusterd;

TEST setup_lvm 1

TEST $CLI volume create $V0 $H0:$L1
TEST $CLI volume start $V0


S1="${V0}-snap1"    #Create snapshot with name contains hyphen(-)
S2="-${V0}-snap2"   #Create snapshot with name starts with hyphen(-)
#Create snapshot with a long name
S3="${V0}_single_gluster_volume_is_accessible_by_multiple_clients_offline_snapshot_is_a_long_name"

TEST $CLI snapshot create $V0 -n $S1
TEST snapshot_exists $S1

TEST $CLI snapshot create $V0 -n $S2
TEST snapshot_exists $S2

TEST $CLI snapshot create $V0 -n $S3
TEST snapshot_exists $S3


TEST mount -t glusterfs $H0:/snaps/$S1/$V0 $M0
TEST umount -f $M0

TEST mount -t glusterfs $H0:/snaps/$S2/$V0 $M0
TEST umount -f $M0

TEST mount -t glusterfs $H0:/snaps/$S3/$V0 $M0
TEST umount -f $M0

#Clean up
TEST $CLI snapshot delete $V0 -s $S1
TEST $CLI snapshot delete $V0 -s $S2
TEST $CLI snapshot delete $V0 -s $S3

TEST $CLI volume stop $V0 force
TEST $CLI volume delete $V0

cleanup;