xenapi: Exit immediately if zipball download fails
If install_os_domU.sh fails to download the Xapi plugins zipball
correctly it ignores the error and continues the installation.
This could damage the hypervisor's filesystem, as it may delete
files or overwrite them with garbage.
Change-Id: I9f6dc31b977592e2818e37b2d310c2a5dc477364
Fixes: bug #1195640
diff --git a/tools/xen/test_functions.sh b/tools/xen/test_functions.sh
index 410df5f..5347238 100755
--- a/tools/xen/test_functions.sh
+++ b/tools/xen/test_functions.sh
@@ -173,6 +173,15 @@
[ "$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)