Skip to content

acceptance: use templates for bundle_default_profile scenarios#5270

Merged
janniklasrose merged 2 commits into
mainfrom
janniklasrose/default-profile-test-templates
May 21, 2026
Merged

acceptance: use templates for bundle_default_profile scenarios#5270
janniklasrose merged 2 commits into
mainfrom
janniklasrose/default-profile-test-templates

Conversation

@janniklasrose
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #5214 (per pietern's review 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

  • go test ./acceptance -run TestAccept/auth/bundle_default_profile -v passes for both DATABRICKS_BUNDLE_ENGINE=terraform and =direct.
  • ./task fmt-q and ./task lint-q clean.

This pull request and its description were written by Isaac.

@janniklasrose janniklasrose requested a review from pietern May 19, 2026 13:09
Base automatically changed from janniklasrose/sethome-absolute to main May 19, 2026 13:22
@janniklasrose janniklasrose enabled auto-merge May 20, 2026 08:44
Replace inline heredocs and per-scenario subdirectories
(./bundle-with-host, ./bundle-with-profile) with three committed
template files: databricks.yml.{no-host,with-host,with-profile}.tmpl.
The script copies (or envsubsts, for the host-pinned template) the
active template into databricks.yml before each phase, so the active
bundle is always at the test root.

Follows pietern's suggestion in #5214.

Co-authored-by: Isaac
@janniklasrose janniklasrose force-pushed the janniklasrose/default-profile-test-templates branch from cde4305 to 4ddfb5e Compare May 21, 2026 09:25
@janniklasrose janniklasrose added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 9411b84 May 21, 2026
23 checks passed
@janniklasrose janniklasrose deleted the janniklasrose/default-profile-test-templates branch May 21, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants