Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request hashicorp#16467 from hashicorp/typeset_migration_r…
Browse files Browse the repository at this point in the history
…emoval

tests/provider: Remove internal typeset functions. Migrate to SDK TypeSet Function (remainder)
  • Loading branch information
breathingdust authored Nov 30, 2020
2 parents 73ccfaf + b31b063 commit 71e7155
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 2,899 deletions.
5 changes: 2 additions & 3 deletions aws/data_source_aws_eks_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/terraform-providers/terraform-provider-aws/aws/internal/tfawsresource"
)

func TestAccAWSEksClusterDataSource_basic(t *testing.T) {
Expand All @@ -28,8 +27,8 @@ func TestAccAWSEksClusterDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttrPair(resourceName, "certificate_authority.0.data", dataSourceResourceName, "certificate_authority.0.data"),
resource.TestCheckResourceAttrPair(resourceName, "created_at", dataSourceResourceName, "created_at"),
resource.TestCheckResourceAttr(dataSourceResourceName, "enabled_cluster_log_types.#", "2"),
tfawsresource.TestCheckTypeSetElemAttr(dataSourceResourceName, "enabled_cluster_log_types.*", "api"),
tfawsresource.TestCheckTypeSetElemAttr(dataSourceResourceName, "enabled_cluster_log_types.*", "audit"),
resource.TestCheckTypeSetElemAttr(dataSourceResourceName, "enabled_cluster_log_types.*", "api"),
resource.TestCheckTypeSetElemAttr(dataSourceResourceName, "enabled_cluster_log_types.*", "audit"),
resource.TestCheckResourceAttrPair(resourceName, "endpoint", dataSourceResourceName, "endpoint"),
resource.TestCheckResourceAttrPair(resourceName, "identity.#", dataSourceResourceName, "identity.#"),
resource.TestCheckResourceAttrPair(resourceName, "identity.0.oidc.#", dataSourceResourceName, "identity.0.oidc.#"),
Expand Down
3 changes: 1 addition & 2 deletions aws/data_source_aws_route53_resolver_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/terraform-providers/terraform-provider-aws/aws/internal/tfawsresource"
)

func TestAccDataSourceAwsRoute53ResolverRules_basic(t *testing.T) {
Expand All @@ -20,7 +19,7 @@ func TestAccDataSourceAwsRoute53ResolverRules_basic(t *testing.T) {
Config: testAccDataSourceAwsRoute53ResolverRules_basic,
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(dsResourceName, "resolver_rule_ids.#", "1"),
tfawsresource.TestCheckTypeSetElemAttr(dsResourceName, "resolver_rule_ids.*", "rslvr-autodefined-rr-internet-resolver"),
resource.TestCheckTypeSetElemAttr(dsResourceName, "resolver_rule_ids.*", "rslvr-autodefined-rr-internet-resolver"),
),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/terraform-providers/terraform-provider-aws/aws/internal/tfawsresource"
)

func TestAccDataSourceAwsServerlessApplicationRepositoryApplication_Basic(t *testing.T) {
Expand Down Expand Up @@ -67,8 +66,8 @@ func TestAccDataSourceAwsServerlessApplicationRepositoryApplication_Versioned(t
resource.TestCheckResourceAttrSet(datasourceName, "source_code_url"),
resource.TestCheckResourceAttrSet(datasourceName, "template_url"),
resource.TestCheckResourceAttr(datasourceName, "required_capabilities.#", "2"),
tfawsresource.TestCheckTypeSetElemAttr(datasourceName, "required_capabilities.*", "CAPABILITY_IAM"),
tfawsresource.TestCheckTypeSetElemAttr(datasourceName, "required_capabilities.*", "CAPABILITY_RESOURCE_POLICY"),
resource.TestCheckTypeSetElemAttr(datasourceName, "required_capabilities.*", "CAPABILITY_IAM"),
resource.TestCheckTypeSetElemAttr(datasourceName, "required_capabilities.*", "CAPABILITY_RESOURCE_POLICY"),
),
},
{
Expand Down
270 changes: 0 additions & 270 deletions aws/internal/tfawsresource/testing.go

This file was deleted.

Loading

0 comments on commit 71e7155

Please sign in to comment.