Skip to content

Commit 5134622

Browse files
fix integration test
1 parent c298a4a commit 5134622

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

internal/providers/pluginfw/products/app/resource_app_acc_test.go

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -193,34 +193,31 @@ func TestAccAppResource_NoCompute(t *testing.T) {
193193
})
194194
}
195195

196-
197196
func TestAccAppResource_InSpace(t *testing.T) {
198197
acceptance.LoadWorkspaceEnv(t)
199198
if acceptance.IsGcp(t) {
200199
acceptance.Skipf(t)("not available on GCP")
201200
}
202201
spaceTemplate := `
203-
resource "databricks_sql_endpoint" "this" {
204-
name = "tf-{var.STICKY_RANDOM}"
205-
cluster_size = "2X-Small"
206-
max_num_clusters = 1
202+
resource "databricks_secret_scope" "space" {
203+
name = "tf-space-{var.STICKY_RANDOM}"
204+
}
207205
208-
tags {
209-
custom_tags {
210-
key = "Owner"
211-
value = "eng-dev-ecosystem-team_at_databricks.com"
212-
}
213-
}
206+
resource "databricks_secret" "space" {
207+
scope = databricks_secret_scope.space.name
208+
key = "tf-{var.STICKY_RANDOM}"
209+
string_value = "secret"
214210
}
215211
216212
resource "databricks_app_space" "this" {
217213
name = "tf-{var.STICKY_RANDOM}"
218214
description = "Space for acceptance test"
219215
resources = [{
220-
name = "warehouse"
221-
sql_warehouse = {
222-
id = databricks_sql_endpoint.this.id
223-
permission = "CAN_USE"
216+
name = "my-secret"
217+
secret = {
218+
scope = databricks_secret_scope.space.name
219+
key = databricks_secret.space.key
220+
permission = "READ"
224221
}
225222
}]
226223
user_api_scopes = ["sql"]
@@ -230,10 +227,10 @@ func TestAccAppResource_InSpace(t *testing.T) {
230227
name = "tf-{var.STICKY_RANDOM}"
231228
description = "App in a space"
232229
space = databricks_app_space.this.name
233-
no_compute = true
234230
}`
235231
acceptance.WorkspaceLevel(t, acceptance.Step{
236232
Template: spaceTemplate,
233+
ExpectNonEmptyPlan: true,
237234
Check: func(s *terraform.State) error {
238235
attrs := s.RootModule().Resources["databricks_app.this"].Primary.Attributes
239236
assert.NotEmpty(t, attrs["resources.#"], "resources should be populated from the space")

0 commit comments

Comments
 (0)