From 7357dbda5790ddd6faffa15ed037cb17e64cfa54 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Feb 02 2018 22:12:46 +0000 Subject: bin/test_nginx.sh: various updates: - print FAILED when the test fails - print extra whiteline to better separate the results - move the nginx_orig creation from the .gitlab-ci.yml to test_nginx.sh --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb4b54d..ecad156 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,6 @@ test_nginx: GIT_SSL_NO_VERIFY: 'true' before_script: - bin/prepare_test_env.sh -g -p nginx - - cp -a /etc/nginx /etc/nginx_orig - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production -f nginx script: bin/test_nginx.sh tags: diff --git a/bin/test_nginx.sh b/bin/test_nginx.sh index 6a70edc..2f9de86 100755 --- a/bin/test_nginx.sh +++ b/bin/test_nginx.sh @@ -43,6 +43,8 @@ create_fake_certs() { done } +cp -a /etc/nginx /etc/nginx_orig + WEB_ROLES=( $(bin/get_roles.py | grep web_) ) for role in ${WEB_ROLES[@]}; do @@ -55,8 +57,10 @@ for role in ${WEB_ROLES[@]}; do if $(nginx -tq); then echo 'PASSED' else + echo 'FAILED' STATUS=1 fi + echo fi done