Skip to content

Commit 1520e52

Browse files
committed
Fix test_acl_getuser_setuser for newer Valkey versions with databases field
Newer Valkey versions return additional 'databases'/'alldbs' fields in ACL selector responses. Use assert_resp_response_in to accept both the old format (without databases) and the new format (with databases: alldbs). Signed-off-by: Matteo Centenaro <matteo.centenaro@aiven.io>
1 parent ab36c7a commit 1520e52

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

tests/test_commands.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,17 @@ def teardown():
331331
assert set(acl["keys"]) == {"~cache:*", "~objects:*"}
332332
assert len(acl["passwords"]) == 2
333333
assert set(acl["channels"]) == {"&message:*"}
334-
assert_resp_response(
334+
assert_resp_response_in(
335335
r,
336336
acl["selectors"],
337-
[["commands", "-@all +set", "keys", "%W~app*", "channels", ""]],
338-
[{"commands": "-@all +set", "keys": "%W~app*", "channels": ""}],
337+
[
338+
[["commands", "-@all +set", "keys", "%W~app*", "channels", ""]],
339+
[["commands", "-@all +set", "keys", "%W~app*", "channels", "", "databases", "alldbs"]],
340+
],
341+
[
342+
[{"commands": "-@all +set", "keys": "%W~app*", "channels": ""}],
343+
[{"commands": "-@all +set", "keys": "%W~app*", "channels": "", "databases": "alldbs"}],
344+
],
339345
)
340346

341347
@skip_if_server_version_lt("6.0.0")

0 commit comments

Comments
 (0)