Skip to content

Commit 5f595d3

Browse files
committed
ci: improves the terraform-test
1 parent 9bbadd2 commit 5f595d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/terraform-test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ do
1010
terraform -chdir=$f init -upgrade
1111
~/.init-env
1212
source ./.terraform_profile
13+
echo "---> plan testing"
14+
echo ""
1315
cp scripts/plan.tftest.hcl $f/
1416
terraform -chdir=$f test test -verbose
1517
if [[ $? -ne 0 ]]; then
1618
success=false
1719
echo -e "\033[31m[ERROR]\033[0m: running terraform test for plan failed."
1820
else
21+
echo "---> plan testing"
22+
echo ""
1923
rm -rf scripts/plan.tftest.hcl
2024
cp scripts/apply.tftest.hcl $f/
2125
terraform -chdir=$f test test
@@ -27,7 +31,7 @@ do
2731
fi
2832
done
2933

30-
if [[ $success ]]; then
34+
if [[ $success == "false" ]]; then
3135
exit 1
3236
fi
3337
exit 0

0 commit comments

Comments
 (0)