Skip to content

Commit

Permalink
Isolate terraform test file fixture per test
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Lopez <marc5.12@outlook.com>
  • Loading branch information
marclop committed May 5, 2021
1 parent eafc2e4 commit b5520f4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ec/acc/deployment_basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestAccDeployment_basic_tf(t *testing.T) {
func TestAccDeployment_basic_config(t *testing.T) {
resName := "ec_deployment.basic"
randomName := prefix + acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)
startCfg := "testdata/deployment_basic.tf"
startCfg := "testdata/deployment_basic_settings_config_1.tf"
settingsConfig := "testdata/deployment_basic_settings_config_2.tf"
cfg := fixtureAccDeploymentResourceBasicWithApps(t, startCfg, randomName, getRegion(), defaultTemplate)
settingsConfigCfg := fixtureAccDeploymentResourceBasicWithApps(t, settingsConfig, randomName, getRegion(), defaultTemplate)
Expand Down
36 changes: 36 additions & 0 deletions ec/acc/testdata/deployment_basic_settings_config_1.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
data "ec_stack" "latest" {
version_regex = "latest"
region = "%s"
}

resource "ec_deployment" "basic" {
name = "%s"
region = "%s"
version = data.ec_stack.latest.version
deployment_template_id = "%s"

elasticsearch {
topology {
id = "hot_content"
size = "1g"
}
}

kibana {
topology {
instance_configuration_id = "%s"
}
}

apm {
topology {
instance_configuration_id = "%s"
}
}

enterprise_search {
topology {
instance_configuration_id = "%s"
}
}
}

0 comments on commit b5520f4

Please sign in to comment.