Merge "xenapi: Exit immediately if zipball download fails"
This commit is contained in:
commit
0ee1367a6d
@ -40,11 +40,11 @@ function extract_remote_zipball {
|
||||
local LOCAL_ZIPBALL=$(mktemp)
|
||||
local EXTRACTED_FILES=$(mktemp -d)
|
||||
|
||||
(
|
||||
{
|
||||
wget -nv $ZIPBALL_URL -O $LOCAL_ZIPBALL --no-check-certificate
|
||||
unzip -q -o $LOCAL_ZIPBALL -d $EXTRACTED_FILES
|
||||
rm -f $LOCAL_ZIPBALL
|
||||
) >&2
|
||||
} >&2
|
||||
|
||||
echo "$EXTRACTED_FILES"
|
||||
}
|
||||
|
@ -34,6 +34,9 @@ function mktemp {
|
||||
}
|
||||
|
||||
function wget {
|
||||
if [[ $@ =~ "failurl" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
echo "wget $@" >> $LIST_OF_ACTIONS
|
||||
}
|
||||
|
||||
|
@ -173,6 +173,15 @@ EOF
|
||||
[ "$RESULT" = "tempdir" ]
|
||||
}
|
||||
|
||||
function test_extract_remote_zipball_wget_fail {
|
||||
set +e
|
||||
|
||||
local IGNORE
|
||||
IGNORE=$(. mocks && extract_remote_zipball "failurl")
|
||||
|
||||
assert_previous_command_failed
|
||||
}
|
||||
|
||||
function test_find_nova_plugins {
|
||||
local tmpdir=$(mktemp -d)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user