File tree Expand file tree Collapse file tree 2 files changed +19
-38
lines changed
.project_automation/functional_tests Expand file tree Collapse file tree 2 files changed +19
-38
lines changed Original file line number Diff line number Diff line change 33# # use this to load any configuration before the static test
44# # TIPS: avoid modifying the .project_automation/static_test/entrypoint.sh
55# # migrate any customization you did on entrypoint.sh to this helper script
6- echo " Executing Pre-Entrypoint Helpers"
6+ echo " Executing Pre-Entrypoint Helpers"
7+
8+ # ********** TFC Env Vars *************
9+ export AWS_DEFAULT_REGION=us-east-1
10+ export TFE_TOKEN=` aws secretsmanager get-secret-value --secret-id abp/tfc/token | jq -r " .SecretString" `
11+ export TF_TOKEN_app_terraform_io=` aws secretsmanager get-secret-value --secret-id abp/tfc/token | jq -r " .SecretString" `
12+
13+ # ********** MAKEFILE *************
14+ echo " Build the lambda function packages"
15+ make all
16+
17+ # ********** Get tfvars from SSM *************
18+ echo " Get *.tfvars from SSM parameter"
19+ aws ssm get-parameter \
20+ --name " /abp/tfc/functional/tfvars" \
21+ --with-decryption \
22+ --query " Parameter.Value" \
23+ --output " text" \
24+ --region " us-east-1" >> functional_test.tfvars
Original file line number Diff line number Diff line change 4343 EXIT_CODE=1
4444fi
4545
46- <<< <<< < before updating
47- # ********** TFC Env Vars *************
48- export AWS_DEFAULT_REGION=us-east-1
49- export TFE_TOKEN=` aws secretsmanager get-secret-value --secret-id abp/tfc/token | jq -r " .SecretString" `
50- export TF_TOKEN_app_terraform_io=` aws secretsmanager get-secret-value --secret-id abp/tfc/token | jq -r " .SecretString" `
51-
52- # ********** MAKEFILE *************
53- echo " Build the lambda function packages"
54- make all
55-
56- # ********** Get tfvars from SSM *************
57- echo " Get *.tfvars from SSM parameter"
58- aws ssm get-parameter \
59- --name " /abp/tfc/functional/tfvars" \
60- --with-decryption \
61- --query " Parameter.Value" \
62- --output " text" \
63- --region " us-east-1" >> functional_test.tfvars
64-
65- # ********** Terratest execution **********
66- echo " Running Terratest"
67- export GOPROXY=https://goproxy.io,direct
68- cd test
69- rm -f go.mod
70- go mod init github.com/aws-ia/terraform-project-ephemeral
71- go mod tidy
72- go install github.com/gruntwork-io/terratest/modules/terraform
73- go test -timeout 45m
74-
75- # ********** CLEANUP *************
76- echo " Cleaning up all temp files and artifacts"
77- cd ${PROJECT_PATH}
78- make clean
79-
80- echo " End of Functional Tests"
81- =======
8246# ********** Post-entrypoint helper *************
8347post_entrypoint
8448
8549# ********** Exit Code *************
8650exit $EXIT_CODE
87- >>>>>>> after updating
You can’t perform that action at this time.
0 commit comments