Skip to content

Commit

Permalink
@review Replace test config string interpolation with concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Babichev committed Dec 21, 2019
1 parent 9ff9b06 commit 801708f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions aws/data_source_aws_directory_service_directory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ resource "aws_subnet" "secondary" {
}

func testAccDataSourceAwsDirectoryServiceDirectoryConfig_SimpleAD(alias string) string {
return fmt.Sprintf(`
%s
return testAccDataSourceAwsDirectoryServiceDirectoryConfig_Prerequisites("simple-ad") + fmt.Sprintf(`
resource "aws_directory_service_directory" "test-simple-ad" {
type = "SimpleAD"
size = "Small"
Expand All @@ -129,13 +127,11 @@ resource "aws_directory_service_directory" "test-simple-ad" {
data "aws_directory_service_directory" "test-simple-ad" {
directory_id = "${aws_directory_service_directory.test-simple-ad.id}"
}
`, testAccDataSourceAwsDirectoryServiceDirectoryConfig_Prerequisites("simple-ad"), alias)
`, alias)
}

func testAccDataSourceAwsDirectoryServiceDirectoryConfig_MicrosoftAD(alias string) string {
return fmt.Sprintf(`
%s
return testAccDataSourceAwsDirectoryServiceDirectoryConfig_Prerequisites("microsoft-ad") + fmt.Sprintf(`
resource "aws_directory_service_directory" "test-microsoft-ad" {
type = "MicrosoftAD"
edition = "Standard"
Expand All @@ -156,5 +152,5 @@ resource "aws_directory_service_directory" "test-microsoft-ad" {
data "aws_directory_service_directory" "test-microsoft-ad" {
directory_id = "${aws_directory_service_directory.test-microsoft-ad.id}"
}
`, testAccDataSourceAwsDirectoryServiceDirectoryConfig_Prerequisites("microsoft-ad"), alias)
`, alias)
}

0 comments on commit 801708f

Please sign in to comment.