diff options
Diffstat (limited to 'tests/snapshot.rc')
| -rw-r--r-- | tests/snapshot.rc | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/tests/snapshot.rc b/tests/snapshot.rc index 60e5b79ec76..f6da514f826 100644 --- a/tests/snapshot.rc +++ b/tests/snapshot.rc @@ -3,7 +3,7 @@ LVM_DEFINED=0 LVM_PREFIX="patchy_snap" LVM_COUNT=0 -VHD_SIZE="1G" +VHD_SIZE="300M" #This function will init B# bricks #This is used when launch_cluster is @@ -94,6 +94,11 @@ function cleanup_lvm() { return 0 } +# Find out how this file was sourced, source traps.rc the same way, and use +# push_trapfunc to make sure cleanup_lvm gets called before we exit. +. $(dirname ${BASH_SOURCE[0]})/traps.rc +push_trapfunc cleanup_lvm + ######################################################## # Private Functions ######################################################## @@ -158,8 +163,8 @@ function _create_lv() { local dir=$1 local num=$2 local vg="VG$num" - local thinpoolsize="0.8G" - local virtualsize="0.6G" + local thinpoolsize="200M" + local virtualsize="150M" /sbin/pvcreate $dir/${LVM_PREFIX}_loop /sbin/vgcreate ${!vg} $dir/${LVM_PREFIX}_loop @@ -431,6 +436,22 @@ function uss_count_snap_displayed() { ls $path/.snaps | wc -l } +function snap_info_volume() +{ + eval local cli_index=\$$1 + local var=$2 + local vol=$3 + $cli_index snapshot info volume $vol | grep "^$var" | sed 's/.*: //' +} + +function snap_config_volume() +{ + eval local cli_index=\$$1 + local var=$2 + local vol=$3 + $cli_index snapshot config $vol| grep "^$var" | sed 's/.*: //' +} + #return specific fields of xml output function get-cmd-field-xml() { @@ -445,6 +466,13 @@ function get-cmd-field-xml() $cli $COMMAND --xml | xmllint --format - | grep $PATTERN } +function get_snap_brick_status() +{ + local snap=$1; + + $CLI snapshot status $snap | grep "Brick Running" | sed 's/.*: //'; +} + case $OSTYPE in NetBSD) echo "Skip test on LVM which is not available on NetBSD" >&2 |
