Skip to content

Commit

Permalink
[Fix] Fix TestAccClusterResource_WorkloadType (#3989)
Browse files Browse the repository at this point in the history
## 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
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant 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
  • Loading branch information
mgyucht authored Sep 3, 2024
1 parent 560e03c commit a9c2001
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/acceptance/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
),
})
}
Expand Down

0 comments on commit a9c2001

Please sign in to comment.