From a9c20018d8c8ee901a8dd1bf889000e4872b6214 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Tue, 3 Sep 2024 14:18:17 -0400 Subject: [PATCH] [Fix] Fix `TestAccClusterResource_WorkloadType` (#3989) ## Changes `TestAccClusterResource_WorkloadType` merged with a small bug that caused it to fail deterministically, asserting that the workload_type had a clients block in state even when it wasn't specified in the config, which is not expected. This PR changes the assertion on state to verify that the block is not present in state when removed from the config. ## Tests - [ ] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] relevant acceptance tests are passing - [ ] using Go SDK --- internal/acceptance/cluster_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/acceptance/cluster_test.go b/internal/acceptance/cluster_test.go index 4dad55c9f7..dd5b2164f8 100644 --- a/internal/acceptance/cluster_test.go +++ b/internal/acceptance/cluster_test.go @@ -171,8 +171,7 @@ func TestAccClusterResource_WorkloadType(t *testing.T) { }, step{ Template: testAccClusterResourceWorkloadTypeTemplate(``), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("databricks_cluster.this", "workload_type.0.clients.0.jobs", "true"), - resource.TestCheckResourceAttr("databricks_cluster.this", "workload_type.0.clients.0.notebooks", "true"), + resource.TestCheckResourceAttr("databricks_cluster.this", "workload_type.#", "0"), ), }) }