Skip to content

Commit

Permalink
Add regression test for ELB name check
Browse files Browse the repository at this point in the history
 - prevent #2580 from hapenning again
  • Loading branch information
radeksimko committed Jul 1, 2015
1 parent e1ce469 commit 7e682c4
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions builtin/providers/aws/resource_aws_elb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ func TestAccAWSELB_basic(t *testing.T) {
})
}

func TestAccAWSELB_fullCharacterRange(t *testing.T) {
var conf elb.LoadBalancerDescription

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSELBDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSELBFullRangeOfCharacters,
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSELBExists("aws_elb.foo", &conf),
resource.TestCheckResourceAttr(
"aws_elb.foo", "name", "FoobarTerraform-test123"),
),
},
},
})
}

func TestAccAWSELB_tags(t *testing.T) {
var conf elb.LoadBalancerDescription
var td elb.TagDescription
Expand Down Expand Up @@ -558,6 +578,20 @@ resource "aws_elb" "bar" {
}
`

const testAccAWSELBFullRangeOfCharacters = `
resource "aws_elb" "foo" {
name = "FoobarTerraform-test123"
availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"]
listener {
instance_port = 8000
instance_protocol = "http"
lb_port = 80
lb_protocol = "http"
}
}
`

const testAccAWSELBConfig_TagUpdate = `
resource "aws_elb" "bar" {
name = "foobar-terraform-test"
Expand Down

0 comments on commit 7e682c4

Please sign in to comment.