Skip to content

Commit

Permalink
remove regression test because the attribute is renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed May 31, 2016
1 parent 73be3e0 commit 20e659c
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions builtin/providers/aws/resource_aws_route53_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,58 +336,6 @@ func TestAccAWSRoute53Record_TypeChange(t *testing.T) {
})
}

// Test record deletion out of band and make sure we render a new plan
// Part of regression test(s) for https://github.com/hashicorp/terraform/pull/4892
func TestAccAWSRoute53Record_planUpdate(t *testing.T) {
var zone route53.GetHostedZoneOutput
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckRoute53RecordDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccRoute53RecordConfig,
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53RecordExists("aws_route53_record.default"),
testAccCheckRoute53ZoneExists("aws_route53_zone.main", &zone),
),
},
resource.TestStep{
Config: testAccRoute53RecordConfig,
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53DeleteRecord("aws_route53_record.default", &zone),
),
ExpectNonEmptyPlan: true,
},
resource.TestStep{
Config: testAccRoute53RecordNoConfig,
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53ZoneExists("aws_route53_zone.main", &zone),
),
},
},
})
}

func testAccCheckRoute53DeleteRecord(n string, zone *route53.GetHostedZoneOutput) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[n]
if !ok {
return fmt.Errorf("Not found: %s", n)
}

if rs.Primary.ID == "" {
return fmt.Errorf("No hosted zone ID is set")
}

// Manually set the weight to 0 to replicate a record created in Terraform
// pre-0.6.9
rs.Primary.Attributes["weight"] = "0"

return nil
}
}

func testAccCheckRoute53RecordDestroy(s *terraform.State) error {
conn := testAccProvider.Meta().(*AWSClient).r53conn
for _, rs := range s.RootModule().Resources {
Expand Down

0 comments on commit 20e659c

Please sign in to comment.