randomize Beanstalk test name

This commit is contained in:
clint shryock 2017-01-30 15:06:29 -06:00
parent 870b85765b
commit 7fcbc0495c
1 changed files with 6 additions and 5 deletions

View File

@ -21,7 +21,7 @@ func TestAccAWSBeanstalkConfigurationTemplate_basic(t *testing.T) {
CheckDestroy: testAccCheckBeanstalkConfigurationTemplateDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccBeanstalkConfigurationTemplateConfig,
Config: testAccBeanstalkConfigurationTemplateConfig(acctest.RandString(5)),
Check: resource.ComposeTestCheckFunc(
testAccCheckBeanstalkConfigurationTemplateExists("aws_elastic_beanstalk_configuration_template.tf_template", &config),
),
@ -142,18 +142,19 @@ func testAccCheckBeanstalkConfigurationTemplateExists(n string, config *elasticb
}
}
const testAccBeanstalkConfigurationTemplateConfig = `
func testAccBeanstalkConfigurationTemplateConfig(r string) string {
return fmt.Sprintf(`
resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name"
description = "tf-test-desc"
name = "tf-test-%s"
description = "tf-test-desc-%s"
}
resource "aws_elastic_beanstalk_configuration_template" "tf_template" {
name = "tf-test-template-config"
application = "${aws_elastic_beanstalk_application.tftest.name}"
solution_stack_name = "64bit Amazon Linux running Python"
}`, r, r)
}
`
func testAccBeanstalkConfigurationTemplateConfig_VPC(name string) string {
return fmt.Sprintf(`