Skip to content

Commit

Permalink
Merge pull request #29613 from hashicorp/t-fix-acceptance-tests
Browse files Browse the repository at this point in the history
Acceptance tests fixes
  • Loading branch information
ewbankkit authored Feb 23, 2023
2 parents b39a68d + 3c3bbe0 commit 900604e
Show file tree
Hide file tree
Showing 14 changed files with 534 additions and 560 deletions.
3 changes: 3 additions & 0 deletions .changelog/29613.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_acmpca_certificate_authority: `revocation_configuration.crl_configuration.expiration_in_days` is Optional
```
3 changes: 0 additions & 3 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/experimental/nullable"
"github.com/hashicorp/terraform-provider-aws/internal/flex"
"github.com/hashicorp/terraform-provider-aws/internal/service/accessanalyzer"
"github.com/hashicorp/terraform-provider-aws/internal/service/account"
"github.com/hashicorp/terraform-provider-aws/internal/service/acm"
"github.com/hashicorp/terraform-provider-aws/internal/service/acmpca"
"github.com/hashicorp/terraform-provider-aws/internal/service/amp"
Expand Down Expand Up @@ -935,8 +934,6 @@ func New(ctx context.Context) (*schema.Provider, error) {
"aws_accessanalyzer_analyzer": accessanalyzer.ResourceAnalyzer(),
"aws_accessanalyzer_archive_rule": accessanalyzer.ResourceArchiveRule(),

"aws_account_alternate_contact": account.ResourceAlternateContact(),

"aws_acm_certificate": acm.ResourceCertificate(),
"aws_acm_certificate_validation": acm.ResourceCertificateValidation(),

Expand Down
21 changes: 21 additions & 0 deletions internal/service/account/account_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package account_test

import (
"testing"

"github.com/hashicorp/terraform-provider-aws/internal/acctest"
)

func TestAccAccount_serial(t *testing.T) {
t.Parallel()

testCases := map[string]map[string]func(t *testing.T){
"AlternateContact": {
"basic": testAccAlternateContact_basic,
"disappears": testAccAlternateContact_disappears,
"AccountID": testAccAlternateContact_accountID,
},
}

acctest.RunSerialTests2Levels(t, testCases, 0)
}
1 change: 1 addition & 0 deletions internal/service/account/alternate_contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/verify"
)

// @SDKResource("aws_account_alternate_contact")
func ResourceAlternateContact() *schema.Resource {
return &schema.Resource{
CreateWithoutTimeout: resourceAlternateContactCreate,
Expand Down
6 changes: 3 additions & 3 deletions internal/service/account/alternate_contact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
)

func TestAccAccountAlternateContact_basic(t *testing.T) {
func testAccAlternateContact_basic(t *testing.T) {
ctx := acctest.Context(t)
resourceName := "aws_account_alternate_contact.test"
domain := acctest.RandomDomainName()
Expand Down Expand Up @@ -63,7 +63,7 @@ func TestAccAccountAlternateContact_basic(t *testing.T) {
})
}

func TestAccAccountAlternateContact_disappears(t *testing.T) {
func testAccAlternateContact_disappears(t *testing.T) {
ctx := acctest.Context(t)
resourceName := "aws_account_alternate_contact.test"
domain := acctest.RandomDomainName()
Expand All @@ -88,7 +88,7 @@ func TestAccAccountAlternateContact_disappears(t *testing.T) {
})
}

func TestAccAccountAlternateContact_accountID(t *testing.T) {
func testAccAlternateContact_accountID(t *testing.T) { // nosemgrep:ci.account-in-func-name
ctx := acctest.Context(t)
resourceName := "aws_account_alternate_contact.test"
domain := acctest.RandomDomainName()
Expand Down
4 changes: 3 additions & 1 deletion internal/service/account/service_package_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 900604e

Please sign in to comment.