Skip to content

[Internal] Use TEST_ENVIRONMENT_TYPE for acceptance test environment detection#5476

Merged
tanmay-db merged 7 commits intomainfrom
move-away-acc-id
Mar 26, 2026
Merged

[Internal] Use TEST_ENVIRONMENT_TYPE for acceptance test environment detection#5476
tanmay-db merged 7 commits intomainfrom
move-away-acc-id

Conversation

@tanmay-db
Copy link
Copy Markdown
Contributor

@tanmay-db tanmay-db commented Mar 11, 2026

Changes

  • Replaces ad-hoc environment variable checks (DATABRICKS_ACCOUNT_ID, TEST_METASTORE_ID) with a single TEST_ENVIRONMENT_TYPE variable for determining test execution context
  • Introduces skipIfNotEnvironmentType() helper that centralizes skip logic for all four test levels: ACCOUNT, WORKSPACE, UC_ACCOUNT, UC_WORKSPACE
  • Simplifies LoadWorkspaceEnv, LoadAccountEnv, LoadUcwsEnv, and LoadUcacctEnv to one-liners

Tests

NO_CHANGELOG=true

@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 11, 2026 18:04 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 11, 2026 18:05 — with GitHub Actions Inactive
@tanmay-db tanmay-db changed the title [Internal] Update test methods to use new environment variables [Internal] Use TEST_ENVIRONMENT_TYPE for acceptance test environment detection Mar 17, 2026
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 17, 2026 13:14 — with GitHub Actions Inactive
@tanmay-db tanmay-db marked this pull request as ready for review March 17, 2026 13:15
@tanmay-db tanmay-db requested review from a team as code owners March 17, 2026 13:15
@tanmay-db tanmay-db requested review from mihaimitrea-db and removed request for a team and mihaimitrea-db March 17, 2026 13:15
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 17, 2026 13:15 — with GitHub Actions Inactive

func LoadWorkspaceEnv(t *testing.T) {
initTest(t, "workspace")
if os.Getenv("DATABRICKS_ACCOUNT_ID") != "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think tthat here we want to run it in both WORKSPCE and UC_WORKSPACE. That is the current behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 26, 2026 10:45 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 5476
  • Commit SHA: 63b6e4dc2953499ddc573d40e6c69e284ed91e04

Checks will be approved automatically on success.

@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 26, 2026 10:46 — with GitHub Actions Inactive
@tanmay-db tanmay-db added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit 9f554cc Mar 26, 2026
12 checks passed
@tanmay-db tanmay-db deleted the move-away-acc-id branch March 26, 2026 13:04
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