Skip to content

Commit a50ff5e

Browse files
authored
[internal] Relay logs when test_experimental_permissions_migration_for_group_with_same_name fails (#1768)
1 parent ca46680 commit a50ff5e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/integration/test_installation.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,16 @@ def test_experimental_permissions_migration_for_group_with_same_name(
115115
)
116116
new_schema_grants = installation_ctx.grants_crawler.for_schema_info(schema_a)
117117

118-
assert {"USAGE", "OWN"} == new_schema_grants[migrated_group.name_in_account]
119-
assert object_permissions[migrated_group.name_in_account] == PermissionLevel.CAN_USE
118+
if {"USAGE", "OWN"} != new_schema_grants[migrated_group.name_in_account] or object_permissions[
119+
migrated_group.name_in_account
120+
] != PermissionLevel.CAN_USE:
121+
installation_ctx.deployed_workflows.relay_logs("migrate-groups-experimental")
122+
assert {"USAGE", "OWN"} == new_schema_grants[
123+
migrated_group.name_in_account
124+
], "Incorrect schema grants for migrated group"
125+
assert (
126+
object_permissions[migrated_group.name_in_account] == PermissionLevel.CAN_USE
127+
), "Incorrect permissions for migrated group"
120128

121129

122130
@retried(on=[NotFound, TimeoutError], timeout=timedelta(minutes=3))

0 commit comments

Comments
 (0)