You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Changes
This PR implements some fixture improvements that were originally
implemented downstream:
- When creating an account or workspace group, we now require the group
to be visible via two subsequent `.get()` and `.list()` calls. This
double-check approach mitigates (but doesn't completely eliminate)
problems with consistency of the APIs for working with groups.
- The `wait_for_provisioning` argument to the `make_group` and
`make_acc_group` has now been removed: we always wait. (For
compatibility the argument is still accepted but will trigger a
deprecation warning.)
An incidental change is the internal unit-test plumbing can now be
provided with mock fixtures specific to the test; this is needed to
ensure the double-check implementation can be tested from the unit
tests.
### Linked issues
Supersedes databrickslabs/ucx#2634.
### Tests
- added/updated unit tests
- existing integration tests
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -542,16 +542,15 @@ See also [`ws`](#ws-fixture), [`make_random`](#make_random-fixture), [`watchdog_
542
542
[[back to top](#python-testing-for-databricks)]
543
543
544
544
### `make_group` fixture
545
-
This fixture provides a function to manage Databricks workspace groups. Groups can be created with
546
-
specified members and roles, and they will be deleted after the test is complete. Deals with eventual
547
-
consistency issues by retrying the creation process for 30 seconds and allowing up to two minutes
548
-
for group to be provisioned. Returns an instance of [`Group`](https://databricks-sdk-py.readthedocs.io/en/latest/dbdataclasses/iam.html#databricks.sdk.service.iam.Group).
545
+
This fixture provides a function to manage Databricks workspace groups. Groups can be created with specified
546
+
members and roles, and they will be deleted after the test is complete. Deals with eventual consistency issues by
547
+
retrying the creation process for 30 seconds and then waiting for up to 3 minutes for the group to be provisioned.
548
+
Returns an instance of [`Group`](https://databricks-sdk-py.readthedocs.io/en/latest/dbdataclasses/iam.html#databricks.sdk.service.iam.Group).
549
549
550
550
Keyword arguments:
551
551
*`members` (list of strings): A list of user IDs to add to the group.
552
552
*`roles` (list of strings): A list of roles to assign to the group.
553
553
*`display_name` (str): The display name of the group.
554
-
*`wait_for_provisioning` (bool): If `True`, the function will wait for the group to be provisioned.
555
554
*`entitlements` (list of strings): A list of entitlements to assign to the group.
556
555
557
556
The following example creates a group with a single member and independently verifies that the group was created:
0 commit comments