Skip to content

Commit

Permalink
Merge pull request #15985 from hashicorp/t-gov-hardendpoint-waf
Browse files Browse the repository at this point in the history
tests/provider: Fix hardcoded endpoint ID (WAF)
  • Loading branch information
YakDriver authored Nov 3, 2020
2 parents ad62ebe + 455d785 commit 78b3139
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion aws/data_source_aws_waf_ipset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"regexp"
"testing"

"github.com/aws/aws-sdk-go/service/waf"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)
Expand All @@ -15,7 +16,7 @@ func TestAccDataSourceAwsWafIPSet_basic(t *testing.T) {
datasourceName := "data.aws_waf_ipset.ipset"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("waf", t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(waf.EndpointsID, t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Expand Down
3 changes: 2 additions & 1 deletion aws/data_source_aws_waf_rate_based_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"regexp"
"testing"

"github.com/aws/aws-sdk-go/service/waf"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)
Expand All @@ -15,7 +16,7 @@ func TestAccDataSourceAwsWafRateBasedRule_basic(t *testing.T) {
datasourceName := "data.aws_waf_rate_based_rule.wafrule"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("waf", t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(waf.EndpointsID, t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Expand Down
3 changes: 2 additions & 1 deletion aws/data_source_aws_waf_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"regexp"
"testing"

"github.com/aws/aws-sdk-go/service/waf"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)
Expand All @@ -15,7 +16,7 @@ func TestAccDataSourceAwsWafRule_basic(t *testing.T) {
datasourceName := "data.aws_waf_rule.wafrule"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("waf", t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(waf.EndpointsID, t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Expand Down
3 changes: 2 additions & 1 deletion aws/data_source_aws_waf_web_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"regexp"
"testing"

"github.com/aws/aws-sdk-go/service/waf"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)
Expand All @@ -15,7 +16,7 @@ func TestAccDataSourceAwsWafWebAcl_basic(t *testing.T) {
datasourceName := "data.aws_waf_web_acl.web_acl"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("waf", t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(waf.EndpointsID, t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Expand Down

0 comments on commit 78b3139

Please sign in to comment.