From 8f53ecd1ff8481f28ce31939c1df251276b9f3a1 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 14 May 2021 15:09:06 +0200 Subject: [PATCH] fixup! SONAR-14822 Write an IT --- test/run-qa.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/run-qa.sh b/test/run-qa.sh index 2f644ae..445471d 100755 --- a/test/run-qa.sh +++ b/test/run-qa.sh @@ -7,13 +7,13 @@ success() { echo -e "\\e[32m✔ $*\\e[0m"; } # Helper function to check if SonarQube is up and running. check_sq_is_up() { - local status="$(curl --silent --user admin:admin http://127.0.0.1:9000/api/system/status)" - local result="$(jq -r '.status' <<< "$status")" + local statusCall="$(curl --silent --user admin:admin http://127.0.0.1:9000/api/system/status)" + local status="$(jq -r '.status' <<< "$statusCall")" if [[ ! $? -eq 0 ]]; then error "Failed to check if SonarQube is up and running." exit 1 fi - echo $result; + echo $status; } info "Build scanner action..." @@ -56,9 +56,7 @@ docker run -v `pwd`:/github/workspace/ --workdir /github/workspace --network $ne if [[ ! $? -eq 0 ]]; then error "Couldn't run the analysis." exit 1 -fi - -if [[ ! -f ".scannerwork/report-task.txt" ]]; then +elif [[ ! -f ".scannerwork/report-task.txt" ]]; then error "Couldn't find the report task file. Analysis failed." exit 1 fi