Skip to content
Snippets Groups Projects
Commit b06df486 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix(test): shellcheck

parent 0490a6e9
No related branches found
No related tags found
No related merge requests found
......@@ -140,9 +140,6 @@ stages:
local junit_tests_report="reports/junit-tests-report.xml"
local coverage_report_opts=-coverprofile=reports/coverage.out
# maybe produce Sonar test report (not failing)
sonar_tests_report || true
set +e
# shellcheck disable=SC2086
go test $GO_TEST_FLAGS "$coverage_report_opts" $GO_TEST_PACKAGES > "$go_text_report"
......@@ -157,11 +154,10 @@ stages:
# produce JUnit report (for GitLab)
install_go_junit_report
# shellcheck disable=SC2002
cat "$go_text_report" | "$GOBIN/go-junit-report" > "$junit_tests_report"
"$GOBIN/go-junit-report" < "$go_text_report" > "$junit_tests_report"
# produce JSON report (for SonarQube)
cat "$go_text_report" | go tool test2json > "$go_json_report"
go tool test2json < "$go_text_report" > "$go_json_report"
# maybe fail
if [[ "$test_rc" != "0" ]]; then exit "$test_rc"; fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment