provider/aws: Add test for TXT route53 record

This commit is contained in:
Clint Shryock 2015-03-16 15:28:45 -05:00
parent dc4abb48fa
commit f4808b1ea7
1 changed files with 30 additions and 0 deletions

View File

@ -28,6 +28,22 @@ func TestAccRoute53Record(t *testing.T) {
})
}
func TestAccRoute53Record_txtSupport(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckRoute53RecordDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccRoute53RecordConfigTXT,
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53RecordExists("aws_route53_record.default"),
),
},
},
})
}
func TestAccRoute53Record_generatesSuffix(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
@ -142,3 +158,17 @@ resource "aws_route53_record" "default" {
records = ["127.0.0.1", "127.0.0.27"]
}
`
const testAccRoute53RecordConfigTXT = `
resource "aws_route53_zone" "main" {
name = "notexample.com"
}
resource "aws_route53_record" "default" {
zone_id = "${aws_route53_zone.main.zone_id}"
name = "subdomain"
type = "TXT"
ttl = "30"
records = ["lalalala"]
}
`