Skip to content

Commit

Permalink
Adding run script
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbdias committed Jun 22, 2023
1 parent dbedfd6 commit 5f31c6d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions test/tracetesting/run.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#/bin/bash

set -e

run_tracetest() {
test_file=$1

tracetest -c ./cli-config.yml test run -d $test_file -w
return $?
}

run_tracetest_with_env() {
test_file=$1
env_file=$2

tracetest -c ./cli-config.yml test run -d $test_file --environment $env_file -w
return $?
}

echo "Starting tests..."

EXIT_STATUS=0

# run business tests
run_tracetest_with_env ./business-tests/user-purchase.yaml ./business-tests/environment-vars.yaml || EXIT_STATUS=$?

# run tech based tests
run_tracetest ./tech-based-tests/ad-get.yaml || EXIT_STATUS=$?
run_tracetest ./tech-based-tests/currency-convert.yaml || EXIT_STATUS=$?
run_tracetest ./tech-based-tests/currency-supported.yaml || EXIT_STATUS=$?

echo ""
echo "Tests done! Exit code: $EXIT_STATUS"

exit $EXIT_STATUS
2 changes: 1 addition & 1 deletion test/tracetesting/tracetest-provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spec:
strategy: periodic
default: true
periodic:
retryDelay: 5s
retryDelay: 10s
timeout: 10m

---
Expand Down

0 comments on commit 5f31c6d

Please sign in to comment.