mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Bug #1174: Fine tune of the tests
(cherry picked from commit e67523aa2e565e52c393270d2b3ac3785de3bae3)
This commit is contained in:
parent
6bf554d4e0
commit
3c000bbcf1
@ -50,9 +50,11 @@ done < <($XPATH /DS_DRIVER_ACTION_DATA/IMAGE/SOURCE \
|
||||
SRC="${XPATH_ELEMENTS[0]}"
|
||||
BASE_PATH="${XPATH_ELEMENTS[1]}"
|
||||
|
||||
BASENAME_SRC=`basename "${SRC##$BASE_PATH}"`
|
||||
|
||||
# ------------ Remove the image from the repository ------------
|
||||
|
||||
if [ -f "$SRC" -a `dirname "$SRC"` = "$BASE_PATH" -a -n `basename "$SRC"` ]
|
||||
if [ -f "$SRC" -a `dirname "$SRC"` = "$BASE_PATH" -a -n "$BASENAME_SRC" ]
|
||||
then
|
||||
log "Removing $SRC from the image repository"
|
||||
|
||||
|
@ -75,7 +75,7 @@ EOF
|
||||
IMAGE_HASH=$(echo $CANONICAL_MD5 | cut -d ' ' -f1)
|
||||
IMAGE_HASH=$(basename "$IMAGE_HASH")
|
||||
|
||||
if [ -z "$IMAGE_HASH" ]; then
|
||||
if [ -z "$IMAGE_HASH" -o -z "$BASE_PATH" ]; then
|
||||
log_error "Error generating the path in generate_image_path."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -50,9 +50,11 @@ done < <($XPATH /DS_DRIVER_ACTION_DATA/IMAGE/SOURCE \
|
||||
SRC="${XPATH_ELEMENTS[0]}"
|
||||
BASE_PATH="${XPATH_ELEMENTS[1]}"
|
||||
|
||||
BASENAME_SRC=`basename "${SRC##$BASE_PATH}"`
|
||||
|
||||
# ------------ Remove the image from the repository ------------
|
||||
|
||||
if [ -d "$SRC" -a `dirname "$SRC"` = "$BASE_PATH" -a -n `basename "$SRC"` ]
|
||||
if [ -d "$SRC" -a `dirname "$SRC"` = "$BASE_PATH" -a -n "$BASENAME_SRC" ]
|
||||
then
|
||||
log "Removing $SRC from the image repository"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user