Skip to content

Commit

Permalink
rename test_action to module_to_test in g-test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
GorginZ committed Jan 27, 2024
1 parent 0f1f75d commit f0bb0e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/go-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

usage() {
echo "Usage: $0 <test_action>"
echo "Usage: $0 <module_to_test>"
echo " order - test order"
echo " payment - test payment"
echo " shipping - test shipping"
Expand All @@ -16,10 +16,10 @@ die() { echo "$1" >&2; exit "${2:-1}"; }

hash docker || die "docker not found" $?

test_action=$1
case $test_action in
module_to_test=$1
case $module_to_test in
order|payment|shipping)
docker compose run --rm go-sh sh -c "cd go-pubsub/$test_action && go test -v ./...";
docker compose run --rm go-sh sh -c "cd go-pubsub/$module_to_test && go test -v ./...";
;;
#example for running all tests for the exercise, we'll build these services out too
all)
Expand Down

0 comments on commit f0bb0e7

Please sign in to comment.