Skip to content

Commit 06af47b

Browse files
authored
Fix test for databricks_job data source (#1649)
1 parent 0a81d78 commit 06af47b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/data-sources/job.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ data "databricks_job" "this" {
1717
}
1818
1919
output "cluster_id" {
20-
value = data.databricks_job.job_settings.existing_cluster_id
20+
value = data.databricks_job.this.job_settings[0].settings[0].new_cluster[0].num_workers
2121
sensitive = false
2222
}
2323
```
@@ -28,7 +28,7 @@ This data source exports the following attributes:
2828

2929
* `job_id` - the id of [databricks_job](../resources/job.md) if the resource was matched by name.
3030
* `job_name` - the job name of [databricks_job](../resources/job.md) if the resource was matched by id.
31-
* `job_settings` - the job settings of [databricks_job](../resources/job.md).
31+
* `job_settings` - the same fields as in [databricks_job](../resources/job.md).
3232

3333
## Related Resources
3434

jobs/acceptance/data_job_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
)
88

9-
func TestAccDataSourceQueryableJob(t *testing.T) {
9+
func TestAccDataSourceJob(t *testing.T) {
1010
acceptance.Test(t, []acceptance.Step{
1111
{
1212
Template: `
@@ -59,7 +59,7 @@ func TestAccDataSourceQueryableJob(t *testing.T) {
5959
}
6060
6161
output "cluster_workers" {
62-
value = data.databricks_job.this.job_settings[0].settings[0].new_cluster[0].num_workers
62+
value = data.databricks_job.this.job_settings
6363
}`,
6464
},
6565
})

0 commit comments

Comments
 (0)