Skip to content

[Internal] Fix databricks_users data source acceptance tests#5531

Open
tanmay-db wants to merge 1 commit intomainfrom
fix-data-users-acc-tests
Open

[Internal] Fix databricks_users data source acceptance tests#5531
tanmay-db wants to merge 1 commit intomainfrom
fix-data-users-acc-tests

Conversation

@tanmay-db
Copy link
Copy Markdown
Contributor

Fix SCIM filters in acceptance tests that never matched the created test users, causing the tests to silently return 0 results. Also fix test name prefixes so CI routes them to the correct environments.

Filter fixes:

  • dataSourceTemplate: "userName co testuser" -> "userName co tf-{RANDOM}" to match created users tf-{RANDOM}-1@databricks.com
  • dataSourceTemplateExtraAttributes: "userName eq me-{RANDOM}@example.com" -> "userName eq tf-{RANDOM}-1@databricks.com" to match created user

Prefix fixes (CI routing):

  • TestAccDataSource* (AccountLevel) -> TestMwsAccDataSource* (account env)
  • TestWorkspaceDataSource* (WorkspaceLevel) -> TestAccDataSource* (workspace env)

These tests were previously dead — wrong prefixes meant CI never selected them, and wrong filters meant they'd fail if they did run.

Co-authored-by: Isaac

Changes

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

Fix SCIM filters in acceptance tests that never matched the created
test users, causing the tests to silently return 0 results. Also fix
test name prefixes so CI routes them to the correct environments.

Filter fixes:
- dataSourceTemplate: "userName co testuser" -> "userName co tf-{RANDOM}"
  to match created users tf-{RANDOM}-1@databricks.com
- dataSourceTemplateExtraAttributes: "userName eq me-{RANDOM}@example.com"
  -> "userName eq tf-{RANDOM}-1@databricks.com" to match created user

Prefix fixes (CI routing):
- TestAccDataSource* (AccountLevel) -> TestMwsAccDataSource* (account env)
- TestWorkspaceDataSource* (WorkspaceLevel) -> TestAccDataSource* (workspace env)

These tests were previously dead — wrong prefixes meant CI never
selected them, and wrong filters meant they'd fail if they did run.

Co-authored-by: Isaac
@tanmay-db tanmay-db requested review from a team as code owners March 27, 2026 10:12
@tanmay-db tanmay-db requested review from parthban-db and removed request for a team March 27, 2026 10:12
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 27, 2026 10:12 — 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: 5531
  • Commit SHA: 77b8ebbca7752e007928e1327f46616cb26f9bbe

Checks will be approved automatically on success.

@tanmay-db tanmay-db removed request for a team and parthban-db March 27, 2026 10:12
@github-actions
Copy link
Copy Markdown

Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
If this is not necessary for your PR, please include the following in your PR description:
NO_CHANGELOG=true
and rerun the job.

@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 27, 2026 10:13 — with GitHub Actions Inactive
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.

1 participant