Commit a86e7dc
acceptance: use templates for bundle_default_profile scenarios (#5270)
## Summary
Follow-up to #5214 (per [pietern's review
comment](#5214 (comment))).
Replace the inline heredocs in
`acceptance/auth/bundle_default_profile/script` with three committed
templates:
- `databricks.yml.no-host.tmpl` — bundle with neither `workspace.host`
nor `workspace.profile`. Used for the "default_profile is honored" and
"`--profile` overrides" phases.
- `databricks.yml.with-host.tmpl` — pins `workspace.host:
$DATABRICKS_HOST`. `envsubst` fills in the test server URL before each
invocation.
- `databricks.yml.with-profile.tmpl` — pins `workspace.profile: other`.
Before each phase the script overwrites the active `databricks.yml` from
the relevant template. The per-scenario subdirectories
(`./bundle-with-host`, `./bundle-with-profile`) and the `cd` calls are
gone — the active bundle is always at the test root.
Stacked on #5266 (sethome-absolute fix). The base will auto-retarget to
`main` once #5266 merges.
`output.txt` is unchanged across the refactor: both engine variants
(`terraform` and `direct`) produce byte-identical output to the
pre-refactor run.
## Test plan
- [x] `go test ./acceptance -run TestAccept/auth/bundle_default_profile
-v` passes for both `DATABRICKS_BUNDLE_ENGINE=terraform` and `=direct`.
- [x] `./task fmt-q` and `./task lint-q` clean.
This pull request and its description were written by Isaac.1 parent 68d1b9f commit a86e7dc
5 files changed
Lines changed: 17 additions & 22 deletions
File tree
- acceptance/auth/bundle_default_profile
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 35 | + | |
42 | 36 | | |
43 | | - | |
| 37 | + | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 42 | + | |
57 | 43 | | |
58 | | - | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
0 commit comments