From 1520e5249b1e73da3723ec95ff0a2ba9681fc07e Mon Sep 17 00:00:00 2001 From: Matteo Centenaro Date: Wed, 22 Apr 2026 18:14:36 +0200 Subject: [PATCH] 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 --- tests/test_commands.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index f6981ac9..16ebbcd8 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -331,11 +331,17 @@ def teardown(): assert set(acl["keys"]) == {"~cache:*", "~objects:*"} assert len(acl["passwords"]) == 2 assert set(acl["channels"]) == {"&message:*"} - assert_resp_response( + assert_resp_response_in( r, acl["selectors"], - [["commands", "-@all +set", "keys", "%W~app*", "channels", ""]], - [{"commands": "-@all +set", "keys": "%W~app*", "channels": ""}], + [ + [["commands", "-@all +set", "keys", "%W~app*", "channels", ""]], + [["commands", "-@all +set", "keys", "%W~app*", "channels", "", "databases", "alldbs"]], + ], + [ + [{"commands": "-@all +set", "keys": "%W~app*", "channels": ""}], + [{"commands": "-@all +set", "keys": "%W~app*", "channels": "", "databases": "alldbs"}], + ], ) @skip_if_server_version_lt("6.0.0")