Commit 54a29ae5 authored by Sebastien Gougeaud's avatar Sebastien Gougeaud Committed by Thomas Leibovici
Browse files

tests: add 'return 0' to test_resource_availability.sh



Those 'return 0' avoid being stopped by 'set -e' in case the
function last command returns a positive, but intended, return code.

Change-Id: I29d6d377a92674d55405307871091313491a4e11
Signed-off-by: default avatarSebastien Gougeaud <sebastien.gougeaud@cea.fr>
Reviewed-on: https://gerrit.ccc.ocre.cea.fr/gerrit/6738


Reviewed-by: Linter
Tested-by: default avatarJenkins s8open_nr <s8open_nr@ccc.ocre.cea.fr>
Reviewed-by: default avatarQuentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: default avatarThomas Leibovici <thomas.leibovici@cea.fr>
parent 087c71a3
......@@ -105,6 +105,8 @@ function put_tape_simple
# $LOG_VALG $phobos drive lock ${DRIVE_ARRAY[0]}
# $LOG_VALG $phobos put /etc/hosts ${id}.2 &&
# error "Should not be able to put objects without unlocked device"
return 0
}
function put_dir_simple
......@@ -126,6 +128,8 @@ function put_dir_simple
$LOG_VALG $phobos dir unlock ${DIR_ARRAY[0]}
$LOG_VALG $phobos put /etc/hosts $id ||
error "Put with an available medium should have worked"
return 0
}
function put_tape_raid
......@@ -158,6 +162,8 @@ function put_tape_raid
# $LOG_VALG $phobos drive lock ${DRIVE_ARRAY[0]}
# $LOG_VALG $phobos put /etc/hosts ${id}.2 &&
# error "Should not be able to put objects with 1/2 unlocked devices"
return 0
}
function put_dir_raid
......@@ -183,6 +189,8 @@ function put_dir_raid
$LOG_VALG $phobos dir unlock ${DIR_ARRAY[0]}
$LOG_VALG $phobos put /etc/hosts $id ||
error "Put with available media should have worked"
return 0
}
function get_tape_simple
......@@ -207,6 +215,8 @@ function get_tape_simple
$LOG_VALG $phobos get $id /tmp/out &&
error "Should not be able to get objects without unlocked medium"
rm /tmp/out
return 0
}
function get_dir_simple
......@@ -223,6 +233,8 @@ function get_dir_simple
$LOG_VALG $phobos get $id /tmp/out &&
error "Should not be able to get objects without unlocked medium"
rm /tmp/out
return 0
}
function get_tape_raid
......@@ -257,6 +269,8 @@ function get_tape_raid
$LOG_VALG $phobos get $id /tmp/out &&
error "Should not be able to get objects without unlocked media"
rm /tmp/out
return 0
}
function get_dir_raid
......@@ -278,6 +292,8 @@ function get_dir_raid
$LOG_VALG $phobos get $id /tmp/out &&
error "Should not be able to get objects without unlocked medium"
rm /tmp/out
return 0
}
if [ -w /dev/changer ]; then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment