summaryrefslogtreecommitdiffstats
path: root/tests/basic/op_errnos.t
blob: 9c48d7a02ad08cb1251a4c58061c8346881d3d9a (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
#!/bin/bash

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

function get-op_errno-xml()
{
        $CLI $1 --xml | xmllint --format - | grep opErrno | sed 's/\(<opErrno>\|<\/opErrno>\)//g'
}

cleanup;
TEST verify_lvm_version;
TEST glusterd;
TEST pidof glusterd;

TEST setup_lvm 1

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

EXPECT 0 get-op_errno-xml "snapshot create snap1 $V0 no-timestamp"
EXPECT 30806 get-op_errno-xml "snapshot create snap1 imaginary_volume"
EXPECT 30807 get-op_errno-xml "snapshot delete imaginary_snap"
EXPECT 30809 get-op_errno-xml "snapshot restore snap1"
TEST $CLI volume stop $V0
EXPECT 30810 get-op_errno-xml "snapshot create snap1 $V0"
TEST $CLI volume start $V0
EXPECT 30811 get-op_errno-xml "snapshot clone $V0 snap1"
EXPECT 30812 get-op_errno-xml "snapshot create snap1 $V0 no-timestamp"

EXPECT 0 get-op_errno-xml "snapshot delete snap1"
TEST $CLI volume stop $V0

cleanup;