1
0
Files
terraform.examples/modules/util/terraform-aws-cli/tests/bad_arn/test.sh
T
2026-02-13 15:44:24 +08:00

21 lines
454 B
Bash
Executable File

#!/usr/bin/env bash
function run_test() {
if [[ -f $PLAN_FILE ]]; then
echo "Incorrectly generated a plan - $PLAN_FILE";
exit 1;
fi
if [[ ! -z "$(cat $PLAN_LOG_FILE)" ]]; then
echo "Incorrectly generated content in the plan log file - $PLAN_LOG_FILE";
exit 2;
fi
if [[ ! "$(cat $PLAN_ERROR_FILE)" == *'The optional ARN must match the format documented in'* ]]; then
echo 'Failed to detect invalid ARN.';
exit 3;
fi
}
. tests/common.sh $0