From 863fa37336835f6c98af44a3134370143ac0df5d Mon Sep 17 00:00:00 2001 From: Vuong Date: Wed, 30 Oct 2024 16:41:33 +0800 Subject: [PATCH] fix test --- internal/acceptance/app_test.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/internal/acceptance/app_test.go b/internal/acceptance/app_test.go index 03845d144..dfdfba26f 100644 --- a/internal/acceptance/app_test.go +++ b/internal/acceptance/app_test.go @@ -20,14 +20,18 @@ var ( } } + resource "databricks_directory" "my_custom_directory" { + path = "/Shared/provider-test/xx_{var.RANDOM}" + } + resource "databricks_workspace_file" "this" { source = "{var.CWD}/../../storage/testdata/tf-test-python.py" - path = "/Shared/%s/xx_{var.RANDOM}" + path = databricks_directory.my_custom_directory.path + "/tf-test-python.py" } resource "databricks_app" "this" { name = "{var.RANDOM}" description = "%s" - source_code_path = databricks_workspace_file.this.workspace_path + source_code_path = databricks_directory.my_custom_directory.path mode = "SNAPSHOT" resource { name = "warehouse" @@ -46,7 +50,7 @@ func TestAccAppCreate(t *testing.T) { skipf(t)("not available on GCP") } WorkspaceLevel(t, Step{ - Template: fmt.Sprintf(appTemplate, "app", "My app"), + Template: fmt.Sprintf(appTemplate, "My app"), }) } @@ -56,8 +60,8 @@ func TestAccAppUpdate(t *testing.T) { skipf(t)("not available on GCP") } WorkspaceLevel(t, Step{ - Template: fmt.Sprintf(appTemplate, "app", "My app"), + Template: fmt.Sprintf(appTemplate, "My app"), }, Step{ - Template: fmt.Sprintf(appTemplate, "app", "My new app"), + Template: fmt.Sprintf(appTemplate, "My new app"), }) }