-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate resolution tests to acceptance tests (#2143)
- Loading branch information
Showing
7 changed files
with
100 additions
and
120 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
acceptance/bundle/variables/resolve-nonstrings/databricks.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
bundle: | ||
name: TestResolveVariableReferencesForPrimitiveNonStringFields | ||
|
||
variables: | ||
no_alert_for_canceled_runs: {} | ||
no_alert_for_skipped_runs: {} | ||
min_workers: {} | ||
max_workers: {} | ||
spot_bid_max_price: {} | ||
|
||
resources: | ||
jobs: | ||
job1: | ||
notification_settings: | ||
no_alert_for_canceled_runs: ${var.no_alert_for_canceled_runs} | ||
no_alert_for_skipped_runs: ${var.no_alert_for_skipped_runs} | ||
tasks: | ||
- new_cluster: | ||
autoscale: | ||
min_workers: ${var.min_workers} | ||
max_workers: ${var.max_workers} | ||
azure_attributes: | ||
spot_bid_max_price: ${var.spot_bid_max_price} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"variables": { | ||
"max_workers": { | ||
"value": "2" | ||
}, | ||
"min_workers": { | ||
"value": "1" | ||
}, | ||
"no_alert_for_canceled_runs": { | ||
"value": "true" | ||
}, | ||
"no_alert_for_skipped_runs": { | ||
"value": "false" | ||
}, | ||
"spot_bid_max_price": { | ||
"value": "0.5" | ||
} | ||
}, | ||
"jobs": { | ||
"job1": { | ||
"deployment": { | ||
"kind": "BUNDLE", | ||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/TestResolveVariableReferencesForPrimitiveNonStringFields/default/state/metadata.json" | ||
}, | ||
"edit_mode": "UI_LOCKED", | ||
"format": "MULTI_TASK", | ||
"notification_settings": { | ||
"no_alert_for_canceled_runs": true, | ||
"no_alert_for_skipped_runs": false | ||
}, | ||
"permissions": [], | ||
"queue": { | ||
"enabled": true | ||
}, | ||
"tags": {}, | ||
"tasks": [ | ||
{ | ||
"new_cluster": { | ||
"autoscale": { | ||
"max_workers": 2, | ||
"min_workers": 1 | ||
}, | ||
"azure_attributes": { | ||
"spot_bid_max_price": 0.5 | ||
} | ||
}, | ||
"task_key": "" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export BUNDLE_VAR_no_alert_for_skipped_runs=false | ||
export BUNDLE_VAR_max_workers=2 | ||
export BUNDLE_VAR_min_workers=3 # shadowed by --var below | ||
$CLI bundle validate -o json --var no_alert_for_canceled_runs=true --var min_workers=1 --var spot_bid_max_price=0.5 | jq '{ variables, jobs: .resources.jobs }' |
9 changes: 9 additions & 0 deletions
9
acceptance/bundle/variables/resolve-vars-in-root-path/databricks.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
bundle: | ||
name: TestResolveVariableReferencesToBundleVariables | ||
|
||
workspace: | ||
root_path: "${bundle.name}/${var.foo}" | ||
|
||
variables: | ||
foo: | ||
value: "bar" |
11 changes: 11 additions & 0 deletions
11
acceptance/bundle/variables/resolve-vars-in-root-path/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"artifact_path": "TestResolveVariableReferencesToBundleVariables/bar/artifacts", | ||
"current_user": { | ||
"short_name": "$USERNAME", | ||
"userName": "$USERNAME" | ||
}, | ||
"file_path": "TestResolveVariableReferencesToBundleVariables/bar/files", | ||
"resource_path": "TestResolveVariableReferencesToBundleVariables/bar/resources", | ||
"root_path": "TestResolveVariableReferencesToBundleVariables/bar", | ||
"state_path": "TestResolveVariableReferencesToBundleVariables/bar/state" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$CLI bundle validate -o json | jq .workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters