Terraform - enable additional tests (#5035)

This commit is contained in:
Bert Blommers 2022-04-17 22:34:48 +00:00 committed by GitHub
parent 14fc1d3e41
commit d8251d4d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 7 deletions

View File

@ -0,0 +1,25 @@
Documentation on how to run Terraform Tests can be found here:
http://docs.getmoto.org/en/latest/docs/contributing/development_tips/tests.html#terraform-tests
To see a list of available tests:
```
cd tests/terraformtests/terraform-provider-aws
go test ./internal/service/elb/ -v -list TestAcc
```
To run a specific test:
```
moto_server -p 4566
make terraformtests SERVICE_NAME=elb TEST_NAMES=NewTestName
```
To see the list of tests that currently pass:
```
python tests/terraformtests/get_tf_services.py
python tests/terraformtests/get_tf_tests.py ec2
```

View File

@ -6,9 +6,9 @@ pwd=$PWD
cd terraform-provider-aws || exit cd terraform-provider-aws || exit
echo "Patching the terraform-provider-aws directory..." echo "Patching the terraform-provider-aws directory..."
PATCH="etc/0001-Patch-Hardcode-endpoints-to-local-server.patch" PATCH="etc/0001-Patch-Hardcode-endpoints-to-local-server.patch"
git apply $pwd/etc/0001-Patch-Hardcode-endpoints-to-local-server.patch || echo "Not patching endpoints - Directory was probably already patched." (git apply $pwd/etc/0001-Patch-Hardcode-endpoints-to-local-server.patch > /dev/null 2>&1 && echo "Patched endpoints") || echo "Not patching endpoints - Directory was probably already patched."
git apply $pwd/etc/0002-EC2-reduce-wait-times.patch || echo "Not patching EC2 - Directory was probably already patched." (git apply $pwd/etc/0002-EC2-reduce-wait-times.patch > /dev/null 2>&1 && echo "Patched EC2") || echo "Not patching EC2 - Directory was probably already patched."
git apply $pwd/etc/0003-Patch-IAM-wait-times.patch || echo "Not patching IAM - Directory was probably already patched." (git apply $pwd/etc/0003-Patch-IAM-wait-times.patch > /dev/null 2>&1 && echo "Patched IAM") || echo "Not patching IAM - Directory was probably already patched."
) )
( (

View File

@ -53,21 +53,17 @@ TestAccLBTargetGroupAttachment
TestAccELBPolicy TestAccELBPolicy
TestAccLambdaAlias TestAccLambdaAlias
TestAccLambdaLayerVersion TestAccLambdaLayerVersion
TestAccMQBroker
TestAccMQBrokerDataSource
TestAccPartition TestAccPartition
TestAccPinpointApp TestAccPinpointApp
TestAccPinpointEventStream TestAccPinpointEventStream
TestAccProvider TestAccProvider
TestAccQuickSightGroup TestAccQuickSightGroup
TestAccQuickSightUser
TestAccSNSSMSPreferences TestAccSNSSMSPreferences
TestAccSNSTopicPolicy TestAccSNSTopicPolicy
TestAccSQSQueuePolicy TestAccSQSQueuePolicy
TestAccSSMDocument TestAccSSMDocument
TestAccSsmDocumentDataSource TestAccSsmDocumentDataSource
TestAccSsmParameterDataSource TestAccSsmParameterDataSource
TestAccTimestreamWriteDatabase
TestAccTimestreamWriteTable TestAccTimestreamWriteTable
TestAccDataSourceLambdaLayerVersion TestAccDataSourceLambdaLayerVersion
TestAccDataSourceLambdaInvocation TestAccDataSourceLambdaInvocation

View File

@ -86,6 +86,10 @@ kms:
- TestAccKMSSecretsDataSource - TestAccKMSSecretsDataSource
meta: meta:
- TestAccMetaBillingServiceAccountDataSource - TestAccMetaBillingServiceAccountDataSource
mq:
- TestAccMQBroker
quicksight:
- TestAccQuickSightUser
redshift: redshift:
- TestAccRedshiftServiceAccountDataSource - TestAccRedshiftServiceAccountDataSource
s3: s3:
@ -96,3 +100,5 @@ sagemaker:
- TestAccSageMakerPrebuiltECRImageDataSource - TestAccSageMakerPrebuiltECRImageDataSource
sts: sts:
- TestAccSTSCallerIdentityDataSource - TestAccSTSCallerIdentityDataSource
timestreamwrite:
- TestAccTimestreamWriteDatabase