Skip to content

Commit 057341a

Browse files
authored
Merge pull request hashicorp#11827 from hashicorp/f-redshift-sg-acctests
provider/aws: Update Redshift SG Acctests
2 parents 86bf9fd + d91bbe4 commit 057341a

2 files changed

Lines changed: 184 additions & 167 deletions

File tree

builtin/providers/aws/import_aws_redshift_security_group_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import (
44
"os"
55
"testing"
66

7+
"github.com/hashicorp/terraform/helper/acctest"
78
"github.com/hashicorp/terraform/helper/resource"
89
)
910

1011
func TestAccAWSRedshiftSecurityGroup_importBasic(t *testing.T) {
1112
oldvar := os.Getenv("AWS_DEFAULT_REGION")
1213
os.Setenv("AWS_DEFAULT_REGION", "us-east-1")
1314
defer os.Setenv("AWS_DEFAULT_REGION", oldvar)
15+
rInt := acctest.RandInt()
1416

1517
resourceName := "aws_redshift_security_group.bar"
1618

@@ -19,11 +21,11 @@ func TestAccAWSRedshiftSecurityGroup_importBasic(t *testing.T) {
1921
Providers: testAccProviders,
2022
CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy,
2123
Steps: []resource.TestStep{
22-
resource.TestStep{
23-
Config: testAccAWSRedshiftSecurityGroupConfig_ingressCidr,
24+
{
25+
Config: testAccAWSRedshiftSecurityGroupConfig_ingressCidr(rInt),
2426
},
2527

26-
resource.TestStep{
28+
{
2729
ResourceName: resourceName,
2830
ImportState: true,
2931
ImportStateVerify: true,

0 commit comments

Comments
 (0)