File: volume-snap-scheduler.t

package info (click to toggle)
glusterfs 11.2-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 28,244 kB
  • sloc: ansic: 471,238; sh: 45,610; python: 16,893; perl: 3,328; makefile: 2,014; yacc: 487; ruby: 171; lisp: 124; xml: 75; lex: 61
file content (49 lines) | stat: -rw-r--r-- 1,091 bytes parent folder | download | duplicates (5)
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
49
#!/bin/bash

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

cleanup;

TEST glusterd;
TEST pidof glusterd;

TEST $CLI volume create $V0 replica 2 $H0:$B0/${GMV0}{1,2,3,4};
TEST $CLI volume start $V0

## Create, start and mount meta_volume as
## snap_scheduler expects shared storage to be enabled.
## This test is very basic in nature not creating any snapshot
## and purpose is to validate snap scheduling commands.

TEST $CLI volume create $META_VOL replica 3 $H0:$B0/${META_VOL}{1,2,3};
TEST $CLI volume start $META_VOL
TEST mkdir -p $META_MNT
TEST glusterfs -s $H0 --volfile-id $META_VOL $META_MNT

##function to check status
function check_status_scheduler()
{
     local key=$1
     snap_scheduler.py status | grep -F "$key" | wc -l
}

##Basic snap_scheduler command test init/enable/disable/list

TEST snap_scheduler.py init

TEST snap_scheduler.py enable

EXPECT 1 check_status_scheduler "Enabled"

TEST snap_scheduler.py disable

EXPECT 1 check_status_scheduler "Disabled"

TEST snap_scheduler.py list

TEST $CLI volume stop $V0;

TEST $CLI volume delete $V0;

cleanup;