Commit be1e2a79 by Stéphane Graber

tests: Clarify error message and fix return codes

Reported-by: Michael J. Evans Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 9292952c
...@@ -34,15 +34,15 @@ FAIL() { ...@@ -34,15 +34,15 @@ FAIL() {
# Only run on a normally configured ubuntu lxc system # Only run on a normally configured ubuntu lxc system
if [ ! -d /sys/class/net/lxcbr0 ]; then if [ ! -d /sys/class/net/lxcbr0 ]; then
echo "lxcbr0 is not configured." echo "lxcbr0 is not configured."
exit 0 exit 1
fi fi
if [ "$(id -u)" != "0" ]; then if [ "$(id -u)" != "0" ]; then
echo "Must run as root." echo "ERROR: Must run as root."
exit 0 exit 1
fi fi
if ! which host 2>&1 > /dev/null; then if ! which host 2>&1 > /dev/null; then
echo "'host' program not found. Please install bind9-host" echo "'host' program not found. Please install bind9-host"
exit 0 exit 1
fi fi
for template in ubuntu ubuntu-cloud; do for template in ubuntu ubuntu-cloud; do
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
# This test assumes an Ubuntu host # This test assumes an Ubuntu host
if [ $(id -u) -ne 0 ]; then if [ $(id -u) -ne 0 ]; then
echo 'run as root' echo "ERROR: Must run as root."
exit 1 exit 1
fi fi
which newuidmap >/dev/null 2>&1 || { echo "'newuidmap' command is missing" >&2; exit 1; } which newuidmap >/dev/null 2>&1 || { echo "'newuidmap' command is missing" >&2; exit 1; }
......
Markdown is supported
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