Skip to content

Commit

Permalink
Merge pull request #11827 from hashicorp/f-redshift-sg-acctests
Browse files Browse the repository at this point in the history
provider/aws: Update Redshift SG Acctests
  • Loading branch information
grubernaut authored Feb 9, 2017
2 parents 86bf9fd + d91bbe4 commit 057341a
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)

func TestAccAWSRedshiftSecurityGroup_importBasic(t *testing.T) {
oldvar := os.Getenv("AWS_DEFAULT_REGION")
os.Setenv("AWS_DEFAULT_REGION", "us-east-1")
defer os.Setenv("AWS_DEFAULT_REGION", oldvar)
rInt := acctest.RandInt()

resourceName := "aws_redshift_security_group.bar"

Expand All @@ -19,11 +21,11 @@ func TestAccAWSRedshiftSecurityGroup_importBasic(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSRedshiftSecurityGroupConfig_ingressCidr,
{
Config: testAccAWSRedshiftSecurityGroupConfig_ingressCidr(rInt),
},

resource.TestStep{
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
Expand Down
Loading

0 comments on commit 057341a

Please sign in to comment.