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
echo "Patching the terraform-provider-aws directory..."
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/0002-EC2-reduce-wait-times.patch || 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/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 > /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 > /dev/null 2>&1 && echo "Patched IAM") || echo "Not patching IAM - Directory was probably already patched."
)
(

View File

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

View File

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