refactoring: Tiny refactoring (#47)

* tiny refactoring name convention, and file name.

* added command line arguments files

* fix typo comment
This commit is contained in:
Mario Candela
2023-06-01 00:15:21 +02:00
committed by GitHub
parent 7d46c9544c
commit a7c69c8849
8 changed files with 38 additions and 27 deletions

View File

@ -39,8 +39,8 @@ jobs:
run: |
echo "Quality Gate: checking test coverage is above threshold ..."
echo "Threshold : $TESTCOVERAGE_THRESHOLD %"
# Excluded the concrete strategy from the coverage calculation, because tested by integration tests
cat coverage.tmp.out | grep -v "secureShellStrategy.go" | grep -v "hypertextTransferProtocolStrategy.go" | grep -v "transmissionControlProtocolStrategy.go" > coverage.out
# Excluded the concrete strategy from the unit test coverage, because covered by integration tests
cat coverage.tmp.out | grep -v "ssh.go" | grep -v "http.go" | grep -v "tcp.go" > coverage.out
totalCoverage=`go tool cover -func=coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]+'`
echo "Current test coverage : $totalCoverage %"
if (( $(echo "$totalCoverage $TESTCOVERAGE_THRESHOLD" | awk '{print ($1 > $2)}') )); then