summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2014-02-10 08:56:17 +0100
committerMichal Minar <miminar@redhat.com>2014-02-10 08:58:38 +0100
commit74fb7ea268deda4402ea9ab441f4832a9083da6c (patch)
tree46f434db140fca70c6fc98f0e1c6b2480c8ec46b
parent102406b51264b52cc2666a5ee43cbf9ac2635baa (diff)
downloadopenlmi-scripts-74fb7ea268deda4402ea9ab441f4832a9083da6c.tar.gz
openlmi-scripts-74fb7ea268deda4402ea9ab441f4832a9083da6c.tar.xz
openlmi-scripts-74fb7ea268deda4402ea9ab441f4832a9083da6c.zip
tests: fixed creation of cimom url in base script
-rw-r--r--test/base.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/base.sh b/test/base.sh
index 540df99..3b18776 100644
--- a/test/base.sh
+++ b/test/base.sh
@@ -39,6 +39,9 @@ LMI_CIMOM_URL=${LMI_CIMOM_URL:-kvm-rhel7}
LMI_CIMOM_USERNAME=${LMI_CIMOM_USERNAME:-root}
LMI_CIMOM_PASSWORD=${LMI_CIMOM_PASSWORD:-redhat}
-SCHEMA=$(echo $LMI_CIMOM_URL | sed -n 's!^\([[:alpha:]]\+://\).*!p')
+SCHEMA=$(echo $LMI_CIMOM_URL | sed -n 's!^\([[:alpha:]]\+://\).*!\1!p')
HOSTNAME=$(echo $LMI_CIMOM_URL | sed -e 's!^.*//!!' -e 's!/.*!!')
-export LMI="lmi -n -h $SCHEMA$LMI_CIMOM_USERNAME:$LMI_CIMOM_PASSWORD@$HOSTNAME"
+LMI="lmi"
+[ -n "$HOSTNAME" ] && \
+ LMI+=" -n -h $SCHEMA$LMI_CIMOM_USERNAME:$LMI_CIMOM_PASSWORD@$HOSTNAME"
+export LMI