Skip to content

Commit 25d6c01

Browse files
committed
Fix flaky integration test for multi-bucket key restrictions
1 parent 922de46 commit 25d6c01

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix flaky integration test for multi-bucket key restrictions.

test/integration/test_b2_command_line.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,9 +815,22 @@ def test_multi_bucket_key_restrictions(b2_tool, bucket_factory):
815815
['bucket', 'get', bucket_b.name],
816816
)
817817

818-
failed_bucket_err = rf"ERROR: Application key is restricted to buckets: \['{bucket_a.name}', '{bucket_b.name}'\]"
818+
failed_bucket_err = rf"ERROR: Application key is restricted to buckets: \['{bucket_a.name}', '{bucket_b.name}'|'{bucket_b.name}', '{bucket_a.name}'\]"
819+
819820
b2_tool.should_fail(['bucket', 'get', bucket_c.name], failed_bucket_err)
820821

822+
# reauthorize with more capabilities for clean up
823+
b2_tool.should_succeed(
824+
[
825+
'account',
826+
'authorize',
827+
'--environment',
828+
b2_tool.realm,
829+
b2_tool.account_id,
830+
b2_tool.application_key,
831+
]
832+
)
833+
821834
b2_tool.should_succeed(['key', 'delete', mb_key_id])
822835

823836

0 commit comments

Comments
 (0)