Skip to content

Commit

Permalink
Fix dashboard acceptance test (#1618)
Browse files Browse the repository at this point in the history
DBSQL resources are organized in a workspace structure as of recently.
As such it is no longer possible to use the same name for different
assets. This acceptance test used to use the same name for both
the dashboard and the query and started failing. The solution here
is to use a different suffix for the different resources.
  • Loading branch information
pietern authored and nkvuong committed Oct 6, 2022
1 parent 62d7fdb commit 230eee2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sql/acceptance/sql_dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ func TestAccDashboard(t *testing.T) {
{
Template: `
resource "databricks_sql_dashboard" "d1" {
name = "tf-{var.RANDOM}"
name = "tf-{var.RANDOM}-dashboard"
// The SQLA API doesn't save tags on create, only on update.
// Uncomment the following when this is fixed.
// tags = [
// "tf-{var.RANDOM}",
// "tf-{var.RANDOM}-dashboard",
// ]
}
Expand Down Expand Up @@ -47,7 +47,7 @@ func TestAccDashboard(t *testing.T) {
resource "databricks_sql_query" "q1" {
data_source_id = databricks_sql_endpoint.this.data_source_id
name = "tf-{var.RANDOM}"
name = "tf-{var.RANDOM}-query"
query = "SELECT 1"
}
Expand All @@ -60,7 +60,7 @@ func TestAccDashboard(t *testing.T) {
}
resource "databricks_sql_endpoint" "this" {
name = "tf-{var.RANDOM}"
name = "tf-{var.RANDOM}-endpoint"
cluster_size = "Small"
max_num_clusters = 1
}
Expand Down

0 comments on commit 230eee2

Please sign in to comment.