From a315183eaf6704ca89734df9fa36329718951ac2 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Tue, 25 Feb 2020 08:19:15 -0700 Subject: [PATCH] add more debugging to app ci script --- .tests/app/setup.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.tests/app/setup.sh b/.tests/app/setup.sh index 1f48410..c180eba 100755 --- a/.tests/app/setup.sh +++ b/.tests/app/setup.sh @@ -14,7 +14,13 @@ echo "listen_address: 127.0.0.1" >> /root/hyperglass/hyperglass.yaml echo "[INFO] Starting UI build." poetry run hyperglass build-ui -echo "[SUCCESS] UI build completed." + +if [[ ! $? == 0 ]]; then + echo "[ERROR] Failed to start hyperglass." + exit 1 +else + echo "[SUCCESS] UI build completed." +fi echo "[INFO] Starting hyperglass..." poetry run hyperglass start &> /var/log/hyperglassci.log & @@ -23,9 +29,10 @@ sleep 10 if [[ ! $? == 0 ]]; then echo "[ERROR] Failed to start hyperglass." exit 1 +else + echo "[SUCCESS] Started hyperglass." fi -echo "[SUCCESS] Started hyperglass." echo "[INFO] Running HTTP test..." STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8001) @@ -36,7 +43,8 @@ if [[ ! $? == 0 ]]; then echo "[ERROR] HTTP test failed." exit 1 elif [[ ! "$STATUS" == "200" ]]; then - echo "[ERROR] HTTP test failed." + echo "[ERROR] HTTP test failed. Startup log:" + cat /var/log/hyperglassci.log exit 1 fi