@@ -81,8 +81,7 @@ build: fmtcheck
81
81
cleango :
82
82
@echo " ==> Cleaning Go..."
83
83
@echo " WARNING: This will kill gopls and clean Go caches"
84
- @processes=` pgrep gopls` ; \
85
- for proc in $$ processes ; do \
84
+ @for proc in ` pgrep gopls` ; do \
86
85
echo " Killing gopls process $$ proc" ; \
87
86
kill -9 $$ proc ; \
88
87
done ; \
@@ -208,24 +207,66 @@ providerlint:
208
207
-XS002=false \
209
208
./internal/service/... ./internal/provider/...
210
209
211
- sanity :
212
- @echo " ==> Sanity Check (48 tests of Top 30 resources)"
213
- @echo " ==> NOTE: This is meant to find big problems with the provider as a whole."
214
- @echo " ==> This is not an exhaustive test."
210
+ sane :
211
+ @echo " ==> Sane Check (48 tests of Top 30 resources)"
212
+ @echo " ==> Like 'sanity' except full output, stops soon after error"
213
+ @echo " ==> NOTE: NOT an exhaustive set of tests! Finds big problems only."
214
+ @TF_ACC=1 $(GO_VER ) test \
215
+ ./internal/service/iam/... \
216
+ -v -count $(TEST_COUNT ) -parallel $(ACCTEST_PARALLELISM ) -run=' TestAccIAMRole_basic|TestAccIAMRole_namePrefix|TestAccIAMRole_disappears|TestAccIAMRole_InlinePolicy_basic|TestAccIAMPolicyDocumentDataSource_basic|TestAccIAMPolicyDocumentDataSource_sourceConflicting|TestAccIAMPolicyDocumentDataSource_sourceJSONValidJSON|TestAccIAMRolePolicyAttachment_basic|TestAccIAMRolePolicyAttachment_disappears|TestAccIAMRolePolicyAttachment_Disappears_role|TestAccIAMPolicy_basic|TestAccIAMPolicy_policy|TestAccIAMPolicy_tags|TestAccIAMRolePolicy_basic|TestAccIAMRolePolicy_unknownsInPolicy|TestAccIAMInstanceProfile_basic|TestAccIAMInstanceProfile_tags' -timeout $(ACCTEST_TIMEOUT )
215
217
@TF_ACC=1 $(GO_VER ) test \
216
218
./internal/service/logs/... \
217
219
./internal/service/ec2/... \
218
220
./internal/service/ecs/... \
219
221
./internal/service/elbv2/... \
222
+ ./internal/service/kms/... \
223
+ -v -count $(TEST_COUNT ) -parallel $(ACCTEST_PARALLELISM ) -run=' TestAccVPCSecurityGroup_basic|TestAccVPCSecurityGroup_ipRangesWithSameRules|TestAccVPCSecurityGroup_vpcAllEgress|TestAccVPCSecurityGroupRule_race|TestAccVPCSecurityGroupRule_protocolChange|TestAccVPCDataSource_basic|TestAccVPCSubnet_basic|TestAccVPC_tenancy|TestAccVPCRouteTableAssociation_Subnet_basic|TestAccVPCRouteTable_basic|TestAccLogsGroup_basic|TestAccLogsGroup_multiple|TestAccKMSKey_basic|TestAccELBV2TargetGroup_basic|TestAccECSTaskDefinition_basic|TestAccECSService_basic' -timeout $(ACCTEST_TIMEOUT )
224
+ @TF_ACC=1 $(GO_VER ) test \
225
+ ./internal/service/lambda/... \
226
+ ./internal/service/meta/... \
227
+ ./internal/service/route53/... \
228
+ ./internal/service/s3/... \
229
+ ./internal/service/secretsmanager/... \
230
+ ./internal/service/sts/... \
231
+ -v -count $(TEST_COUNT ) -parallel $(ACCTEST_PARALLELISM ) -run=' TestAccSTSCallerIdentityDataSource_basic|TestAccMetaRegionDataSource_basic|TestAccMetaRegionDataSource_endpoint|TestAccMetaPartitionDataSource_basic|TestAccS3Bucket_Basic_basic|TestAccS3Bucket_Security_corsUpdate|TestAccS3BucketPublicAccessBlock_basic|TestAccS3BucketPolicy_basic|TestAccS3BucketACL_updateACL|TestAccRoute53Record_basic|TestAccRoute53Record_Latency_basic|TestAccRoute53ZoneDataSource_name|TestAccLambdaFunction_basic|TestAccLambdaPermission_basic|TestAccSecretsManagerSecret_basic' -timeout $(ACCTEST_TIMEOUT )
232
+
233
+ sanity :
234
+ @echo " ==> Sanity Check (48 tests of Top 30 resources)"
235
+ @echo " ==> Like 'sane' but little output, runs all tests despite errors"
236
+ @echo " ==> NOTE: NOT an exhaustive set of tests! Finds big problems only."
237
+ @iam=` TF_ACC=1 $( GO_VER) test \
220
238
./internal/service/iam/... \
239
+ -v -count $(TEST_COUNT ) -parallel $(ACCTEST_PARALLELISM ) -run=' TestAccIAMRole_basic|TestAccIAMRole_namePrefix|TestAccIAMRole_disappears|TestAccIAMRole_InlinePolicy_basic|TestAccIAMPolicyDocumentDataSource_basic|TestAccIAMPolicyDocumentDataSource_sourceConflicting|TestAccIAMPolicyDocumentDataSource_sourceJSONValidJSON|TestAccIAMRolePolicyAttachment_basic|TestAccIAMRolePolicyAttachment_disappears|TestAccIAMRolePolicyAttachment_Disappears_role|TestAccIAMPolicy_basic|TestAccIAMPolicy_policy|TestAccIAMPolicy_tags|TestAccIAMRolePolicy_basic|TestAccIAMRolePolicy_unknownsInPolicy|TestAccIAMInstanceProfile_basic|TestAccIAMInstanceProfile_tags' -timeout $(ACCTEST_TIMEOUT ) || true` ; \
240
+ fails1=` echo -n $$ iam | grep -Fo FAIL: | wc -l | xargs` ; \
241
+ passes=$$(( 17-$$fails1 ) ) ; \
242
+ echo " 17 of 48 complete: $$ passes passed, $$ fails1 failed" ; \
243
+ logs=` TF_ACC=1 $( GO_VER) test \
244
+ ./internal/service/logs/... \
245
+ ./internal/service/ec2/... \
246
+ ./internal/service/ecs/... \
247
+ ./internal/service/elbv2/... \
221
248
./internal/service/kms/... \
249
+ -v -count $(TEST_COUNT ) -parallel $(ACCTEST_PARALLELISM ) -run=' TestAccVPCSecurityGroup_basic|TestAccVPCSecurityGroup_ipRangesWithSameRules|TestAccVPCSecurityGroup_vpcAllEgress|TestAccVPCSecurityGroupRule_race|TestAccVPCSecurityGroupRule_protocolChange|TestAccVPCDataSource_basic|TestAccVPCSubnet_basic|TestAccVPC_tenancy|TestAccVPCRouteTableAssociation_Subnet_basic|TestAccVPCRouteTable_basic|TestAccLogsGroup_basic|TestAccLogsGroup_multiple|TestAccKMSKey_basic|TestAccELBV2TargetGroup_basic|TestAccECSTaskDefinition_basic|TestAccECSService_basic' -timeout $(ACCTEST_TIMEOUT ) || true` ; \
250
+ fails2=` echo -n $$ logs | grep -Fo FAIL: | wc -l | xargs` ; \
251
+ tot_fails=$$(( $$fails1+$$fails2 ) ) ; \
252
+ passes=$$(( 33-$$tot_fails ) ) ; \
253
+ echo " 33 of 48 complete: $$ passes passed, $$ tot_fails failed" ; \
254
+ lambda=` TF_ACC=1 $( GO_VER) test \
222
255
./internal/service/lambda/... \
223
256
./internal/service/meta/... \
224
257
./internal/service/route53/... \
225
258
./internal/service/s3/... \
226
259
./internal/service/secretsmanager/... \
227
260
./internal/service/sts/... \
228
- -v -count $(TEST_COUNT) -parallel $(ACCTEST_PARALLELISM) -run='TestAccIAMRole_basic|TestAccIAMRole_namePrefix|TestAccIAMRole_disappears|TestAccIAMRole_InlinePolicy_basic|TestAccIAMPolicyDocumentDataSource_basic|TestAccIAMPolicyDocumentDataSource_sourceConflicting|TestAccIAMPolicyDocumentDataSource_sourceJSONValidJSON|TestAccIAMRolePolicyAttachment_basic|TestAccIAMRolePolicyAttachment_disappears|TestAccIAMRolePolicyAttachment_Disappears_role|TestAccIAMPolicy_basic|TestAccIAMPolicy_policy|TestAccIAMPolicy_tags|TestAccIAMRolePolicy_basic|TestAccIAMRolePolicy_unknownsInPolicy|TestAccIAMInstanceProfile_basic|TestAccIAMInstanceProfile_tags|TestAccSTSCallerIdentityDataSource_basic|TestAccVPCSecurityGroup_basic|TestAccVPCSecurityGroup_ipRangesWithSameRules|TestAccVPCSecurityGroup_vpcAllEgress|TestAccVPCSecurityGroupRule_race|TestAccVPCSecurityGroupRule_protocolChange|TestAccVPCDataSource_basic|TestAccVPCSubnet_basic|TestAccVPC_tenancy|TestAccVPCRouteTableAssociation_Subnet_basic|TestAccVPCRouteTable_basic|TestAccLogsGroup_basic|TestAccLogsGroup_multiple|TestAccMetaRegionDataSource_basic|TestAccMetaRegionDataSource_endpoint|TestAccMetaPartitionDataSource_basic|TestAccS3Bucket_Basic_basic|TestAccS3Bucket_Security_corsUpdate|TestAccS3BucketPublicAccessBlock_basic|TestAccS3BucketPolicy_basic|TestAccS3BucketACL_updateACL|TestAccRoute53Record_basic|TestAccRoute53Record_Latency_basic|TestAccRoute53ZoneDataSource_name|TestAccLambdaFunction_basic|TestAccLambdaPermission_basic|TestAccKMSKey_basic|TestAccELBV2TargetGroup_basic|TestAccSecretsManagerSecret_basic|TestAccECSTaskDefinition_basic|TestAccECSService_basic' -timeout $(ACCTEST_TIMEOUT)
261
+ -v -count $(TEST_COUNT ) -parallel $(ACCTEST_PARALLELISM ) -run=' TestAccSTSCallerIdentityDataSource_basic|TestAccMetaRegionDataSource_basic|TestAccMetaRegionDataSource_endpoint|TestAccMetaPartitionDataSource_basic|TestAccS3Bucket_Basic_basic|TestAccS3Bucket_Security_corsUpdate|TestAccS3BucketPublicAccessBlock_basic|TestAccS3BucketPolicy_basic|TestAccS3BucketACL_updateACL|TestAccRoute53Record_basic|TestAccRoute53Record_Latency_basic|TestAccRoute53ZoneDataSource_name|TestAccLambdaFunction_basic|TestAccLambdaPermission_basic|TestAccSecretsManagerSecret_basic' -timeout $(ACCTEST_TIMEOUT ) || true` ; \
262
+ fails3=` echo -n $$ lambda | grep -Fo FAIL: | wc -l | xargs` ; \
263
+ tot_fails=$$(( $$fails1+$$fails2+$$fails3 ) ) ; \
264
+ passes=$$(( 48-$$tot_fails ) ) ; \
265
+ echo " 48 of 48 complete: $$ passes passed, $$ tot_fails failed" ; \
266
+ if [ $$ tot_fails -gt 0 ] ; then \
267
+ echo " Sanity tests failed" ; \
268
+ exit 1; \
269
+ fi
229
270
230
271
semall :
231
272
@echo " ==> Running Semgrep checks locally (must have semgrep installed)..."
@@ -373,6 +414,7 @@ yamllint:
373
414
importlint \
374
415
lint \
375
416
providerlint \
417
+ sane \
376
418
sanity \
377
419
semall \
378
420
semgrep \
0 commit comments