Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nfx committed Sep 5, 2023
1 parent e0d3be2 commit 7e8d275
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/databricks/labs/ucx/providers/mixins/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ def inner(**kwargs):
_LOG.debug(f"removing {name} fixture: {x}")
remove(x)
except DatabricksError as e:
if e.error_code in ("RESOURCE_DOES_NOT_EXIST",):
_LOG.debug(f"ignoring error while {name} {x} teardown: {e}")
continue
raise e
# TODO: fix on the databricks-labs-pytester level
_LOG.debug(f"ignoring error while {name} {x} teardown: {e}")


@pytest.fixture
Expand Down
1 change: 1 addition & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def inner():
ws_group = make_group(display_name=display_name, members=members, entitlements=["allow-cluster-create"])
acc_group = make_acc_group(display_name=display_name, members=members)
return ws_group, acc_group

return inner


Expand Down
8 changes: 6 additions & 2 deletions tests/integration/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ def test_e2e(

toolkit.replace_workspace_groups_with_account_groups()

new_groups = [_ for _ in ws.groups.list(attributes="displayName,meta") if group_migration_state.is_in_scope('account', _)]
new_groups = [
_ for _ in ws.groups.list(attributes="displayName,meta") if group_migration_state.is_in_scope("account", _)
]
assert len(new_groups) == len(group_migration_state.groups)
assert all(g.meta.resource_type == "Group" for g in new_groups)

Expand All @@ -220,7 +222,9 @@ def test_e2e(

toolkit.delete_backup_groups()

backup_groups = [_ for _ in ws.groups.list(attributes="displayName,meta") if group_migration_state.is_in_scope('backup', _)]
backup_groups = [
_ for _ in ws.groups.list(attributes="displayName,meta") if group_migration_state.is_in_scope("backup", _)
]
assert len(backup_groups) == 0

toolkit.cleanup_inventory_table()
6 changes: 1 addition & 5 deletions tests/integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@

from databricks.sdk import WorkspaceClient
from databricks.sdk.service.compute import ClusterSpec, DataSecurityMode
from databricks.sdk.service.iam import (
AccessControlRequest,
Group,
PermissionLevel,
)
from databricks.sdk.service.iam import AccessControlRequest, Group, PermissionLevel
from databricks.sdk.service.jobs import JobCluster, PythonWheelTask, Task
from databricks.sdk.service.workspace import ObjectInfo

Expand Down

0 comments on commit 7e8d275

Please sign in to comment.