Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration tests for databricks_entitlements #3467

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

mgyucht
Copy link
Contributor

@mgyucht mgyucht commented Apr 15, 2024

Changes

The integration tests for databricks_entitlements are now failing. I believe this is caused by a race condition between databricks_group and databricks_entitlements resources. In practice, these resources should not be used at the same time; instead, you should the former when you need to define the group in TF and the latter if the group is defined externally to TF.

First, I've improved the test coverage for entitlements to cover all resource types (user, group, service principal). As part of this, I've rewritten the tests to manage the resources externally from Terraform's perspective, so there are no more race conditions. Because of this, I'm able to remove the other integration tests, including the flaky one.

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@mgyucht mgyucht requested review from a team as code owners April 15, 2024 13:01
@mgyucht mgyucht requested review from tanmay-db and removed request for a team April 15, 2024 13:01
Copy link
Contributor

@tanmay-db tanmay-db left a comment

Choose a reason for hiding this comment

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

Went through the changes, LGTM.

@mgyucht mgyucht added this pull request to the merge queue Apr 16, 2024
Merged via the queue into main with commit 43ead70 Apr 16, 2024
5 checks passed
@mgyucht mgyucht deleted the fix-entitlements-test branch April 16, 2024 08:34
@tanmay-db tanmay-db mentioned this pull request Apr 16, 2024
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.

3 participants