From 4e2dc1286931fa3095c943c98d51819d88507ef8 Mon Sep 17 00:00:00 2001 From: jorgedocampo Date: Wed, 21 Dec 2022 22:16:42 +0100 Subject: [PATCH] clean state --- terraform/databricks/test/unit_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/terraform/databricks/test/unit_test.go b/terraform/databricks/test/unit_test.go index a372c42b..5b5e739d 100644 --- a/terraform/databricks/test/unit_test.go +++ b/terraform/databricks/test/unit_test.go @@ -16,6 +16,8 @@ func TestModule(t *testing.T) { // At the end of the test, run `terraform destroy` to clean up any resources that were created defer terraform.Destroy(t, terraformOptions) + // At the end of the test, run `terraform state rm module.databricks.databricks_workspace_conf.adb_ws_conf` to clean up state for workspace config + defer terraform.RunTerraformCommand(t, terraformOptions, terraform.FormatArgs(terraformOptions, "state", "rm", "module.databricks.databricks_workspace_conf.adb_ws_conf")...) // Is used mainly for debugging, fail early if plan is not possible terraform.InitAndPlan(t, terraformOptions)