Skip to content

Commit

Permalink
Fixed ambiguity in test script
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma authored Mar 19, 2024
1 parent 9334d8f commit fb149eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/scripts/test-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Params: $1 is the directory name, @2 (optional) additional argument to pass to terraform commands, $3 (optional), the module registry URL, $4 (optional), the module version
set -e
pushd "$1"
if [ -n "$3" ] ; then sed -i "s@source =.*@source = \"$3\"@g" main.tf; fi
if [ -n "$3" ] ; then sed -i "s@source = \"../.*@source = \"$3\"@g" main.tf; fi
if [ -n "$4" ] ; then sed -i "s@# version =.*@version = \"$4\"@g" main.tf; fi
cat main.tf
terraform init
Expand All @@ -14,4 +14,4 @@ terraform apply -auto-approve $2
terraform plan $2 | grep "No changes"
sleep 1
terraform destroy -auto-approve $2
popd
popd

0 comments on commit fb149eb

Please sign in to comment.