From 7d47bc8bdcb7181a91edfaa4be334ca415ed5d3f Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Fri, 19 Feb 2016 12:48:37 +0100 Subject: [PATCH] MT#17213 Fix eaf3b9d: update goss after ngcp-upgrade Otherwise we have an old goss binary file after upgrade mr4.2->mr4.3 which doesn't understand new goss.json format: > Error: json: cannot unmarshal array into Go value of type string P.S. We need a goss Debian package here :-( Change-Id: Ib3038ea0f42843756d02f52b2a13d718234b0fed --- testrunner | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/testrunner b/testrunner index bd50a80..0cf002e 100755 --- a/testrunner +++ b/testrunner @@ -20,12 +20,17 @@ case "${TYPE}" in *) echo "ERRRO: Unknown type '$1'" >&2 ; usage >&2 ; exit 1 ;; esac -if [ ! -x /usr/sbin/goss ] ; then - echo "Downloading goss and installing as /usr/sbin/goss" - curl -L https://deb.sipwise.com/files/goss-0.0.22-linux-amd64 > /usr/sbin/goss - chmod +x /usr/sbin/goss +goss="goss-0.0.22-linux-amd64" + +if [ ! -x "/usr/sbin/${goss}" ] ; then + echo "Downloading goss and installing as /usr/sbin/${goss}" + curl -L "https://deb.sipwise.com/files/${goss}" > "/usr/sbin/${goss}" + chmod +x "/usr/sbin/${goss}" fi +rm -f /usr/sbin/goss +ln -s "/usr/sbin/${goss}" /usr/sbin/goss + host_yml_file="/etc/ngcp-config/config.$(hostname).yml" if [ -n "${SKIP_DNS_CHECK_TEST}" ] || [ -n "${SKIP_STRICT_HOSTNAME_TEST}" ] ; then echo "Configuring host specific YML config: ${host_yml_file}"