Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/provider: Use SDK v2 compliant ExpectError conditions #14434

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jul 31, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Reference: #12087

Release note for CHANGELOG:

NONE

The config is invalid: prefix is no longer present in Terraform Plugin SDK v2. e.g.

TestAccAWSAcmCertificate_root_TrailingPeriod: resource_aws_acm_certificate_test.go:258: Expected an error with pattern, no match on: terraform failed: exit status 1
stderr:
Error: invalid value for domain_name (cannot end with a period)
on config733606703/terraform_plugin_test.tf line 3, in resource "aws_acm_certificate" "cert":
3:   domain_name       = "--OMITTED--"
--- FAIL: TestAccAWSAcmCertificate_root_TrailingPeriod (4.02s)

Output from acceptance testing (V1):

--- PASS: TestAccAWSAcmCertificate_root_TrailingPeriod (0.85s)
--- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_Empty (0.85s)
--- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_Empty (0.94s)
--- PASS: TestAccAWSSESDomainIdentity_trailingPeriod (1.17s)

The `config is invalid:` prefix is no longer present in Terraform Plugin SDK v2. e.g.

```
TestAccAWSAcmCertificate_root_TrailingPeriod: resource_aws_acm_certificate_test.go:258: Expected an error with pattern, no match on: terraform failed: exit status 1
stderr:
Error: invalid value for domain_name (cannot end with a period)
on config733606703/terraform_plugin_test.tf line 3, in resource "aws_acm_certificate" "cert":
3:   domain_name       = "--OMITTED--"
--- FAIL: TestAccAWSAcmCertificate_root_TrailingPeriod (4.02s)
```

Output from acceptance testing (V1):

```
--- PASS: TestAccAWSAcmCertificate_root_TrailingPeriod (0.85s)
--- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_Empty (0.85s)
--- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_Empty (0.94s)
--- PASS: TestAccAWSSESDomainIdentity_trailingPeriod (1.17s)
```
@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Jul 31, 2020
@bflad bflad requested review from appilon and a team July 31, 2020 16:03
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/acm Issues and PRs that pertain to the acm service. service/s3 Issues and PRs that pertain to the s3 service. service/ses Issues and PRs that pertain to the ses service. labels Jul 31, 2020
@bflad bflad added this to the v3.1.0 milestone Jul 31, 2020
@bflad bflad merged commit 53b02f2 into master Jul 31, 2020
@bflad bflad deleted the t-v2-compliant-ExpectError branch July 31, 2020 17:09
@ghost
Copy link

ghost commented Aug 7, 2020

This has been released in version 3.1.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Aug 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/acm Issues and PRs that pertain to the acm service. service/s3 Issues and PRs that pertain to the s3 service. service/ses Issues and PRs that pertain to the ses service. size/XS Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants