Skip to content

Commit

Permalink
remove integration tests, will be added later
Browse files Browse the repository at this point in the history
  • Loading branch information
william-conti committed Oct 12, 2023
1 parent 8f3d047 commit 6f08b60
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 232 deletions.
2 changes: 1 addition & 1 deletion src/databricks/labs/ucx/workspace_access/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ def get_apply_task(

@abstractmethod
def object_types(self) -> set[str]:
"""This method returns a set of strings, that represent object types that are applicable by this instance."""
"""This method returns a set of strings, that represent object types that are applicable by this instance."""
164 changes: 0 additions & 164 deletions tests/integration/workspace_access/test_generic.py

This file was deleted.

60 changes: 0 additions & 60 deletions tests/integration/workspace_access/test_scim.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/unit/workspace_access/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ def test_task():
negative_item = Permissions(object_id="not-here", object_type="test", raw="test")
task = applier.get_apply_task(negative_item, migration_state, "backup")
assert task is None

12 changes: 6 additions & 6 deletions tests/unit/workspace_access/test_redash.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_apply(migration_state):
),
],
)
sup = SqlPermissionsSupport(ws=ws, listings=[])
sup = RedashPermissionsSupport(ws=ws, listings=[])
item = Permissions(
object_id="test",
object_type="alerts",
Expand Down Expand Up @@ -147,7 +147,7 @@ def test_applier_task_should_return_true_if_permission_is_up_to_date():
access_control_list=[acl_grp_1, acl_grp_2],
)

sup = SqlPermissionsSupport(ws=ws, listings=[])
sup = RedashPermissionsSupport(ws=ws, listings=[])
result = sup._applier_task(sql.ObjectTypePlural.QUERIES, "test", [acl_grp_1])
assert result

Expand All @@ -164,7 +164,7 @@ def test_applier_task_should_return_true_if_permission_is_up_to_date_with_multip
access_control_list=[acl_1_grp_1, acl_2_grp_1, acl_3_grp_1, acl_grp_2],
)

sup = SqlPermissionsSupport(ws=ws, listings=[])
sup = RedashPermissionsSupport(ws=ws, listings=[])
result = sup._applier_task(sql.ObjectTypePlural.QUERIES, "test", [acl_1_grp_1, acl_2_grp_1])
assert result

Expand All @@ -180,7 +180,7 @@ def test_applier_task_should_return_false_if_permission_are_not_up_to_date():
],
)

sup = SqlPermissionsSupport(ws=ws, listings=[])
sup = RedashPermissionsSupport(ws=ws, listings=[])
result = sup._applier_task(
sql.ObjectTypePlural.QUERIES,
"test",
Expand All @@ -200,7 +200,7 @@ def test_applier_task_should_return_false_if_all_permissions_are_not_up_to_date(
],
)

sup = SqlPermissionsSupport(ws=ws, listings=[])
sup = RedashPermissionsSupport(ws=ws, listings=[])
result = sup._applier_task(
sql.ObjectTypePlural.QUERIES,
"test",
Expand All @@ -223,7 +223,7 @@ def test_applier_task_should_be_called_three_times_if_permission_is_not_up_to_da
],
)

sup = SqlPermissionsSupport(ws=ws, listings=[])
sup = RedashPermissionsSupport(ws=ws, listings=[])
input_acl = sql.AccessControl(group_name="group_1", permission_level=sql.PermissionLevel.CAN_RUN)

sup._applier_task(
Expand Down

0 comments on commit 6f08b60

Please sign in to comment.