Skip to content

test_commands.py::TestRedisCommands::test_acl_getuser_setuser and test_commands.py::TestRedisCommands::test_acl_list fail in 3.5.3 #1459

Closed
@mcepl

Description

@mcepl

Version: redis-py 3.5.3 and redis 6.2.1 (both packaged in openSUSE)

Platform: Linux/openSUSE/Tumbleweed

Description: while packaging your package for openSUSE/Tumbleweed we always run as much of test suite of every package as we can. While running the test suite it fails in these two tests:

[   64s] + echo python36
[   64s] + python_flavor=python36
[   64s] + PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python-redis-3.5.3-2.5.x86_64/usr/lib/python3.6/site-packages
[   64s] + PYTHONDONTWRITEBYTECODE=1
[   64s] + pytest-3.6 --ignore=_build.python36 --ignore=_build.python38 -v
[   64s] 1204:C 09 Mar 2021 16:38:48.914 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[   64s] 1204:C 09 Mar 2021 16:38:48.914 # Redis version=6.2.1, bits=64, commit=00000000, modified=0, pid=1204, just started
[   64s] 1204:C 09 Mar 2021 16:38:48.914 # Configuration loaded
[   64s] 1204:M 09 Mar 2021 16:38:48.915 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
[   64s] 1204:M 09 Mar 2021 16:38:48.916 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
[   64s] 1204:M 09 Mar 2021 16:38:48.916 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
[   64s] 1204:M 09 Mar 2021 16:38:48.916 * monotonic clock: POSIX clock_gettime
[   64s] 1204:M 09 Mar 2021 16:38:48.916 * Running mode=standalone, port=6379.
[   64s] 1204:M 09 Mar 2021 16:38:48.916 # Server initialized
[   64s] 1204:M 09 Mar 2021 16:38:48.916 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[   64s] 1204:M 09 Mar 2021 16:38:48.917 * Ready to accept connections
[   65s] ============================= test session starts ==============================
[   65s] platform linux -- Python 3.6.13, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.6
[   65s] cachedir: .pytest_cache
[   65s] rootdir: /home/abuild/rpmbuild/BUILD/redis-3.5.3
[   68s] collecting ... collected 475 items

[ ... many passing tests skipped ...]

[   80s] =================================== FAILURES ===================================
[   80s] __________________ TestRedisCommands.test_acl_getuser_setuser __________________
[   80s] 
[   80s] self = <tests.test_commands.TestRedisCommands object at 0x7fca4ef9b588>
[   80s] r = Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>
[   80s] request = <FixtureRequest for <Function test_acl_getuser_setuser>>
[   80s] 
[   80s]     @skip_if_server_version_lt(REDIS_6_VERSION)
[   80s]     def test_acl_getuser_setuser(self, r, request):
[   80s]         username = 'redis-py-user'
[   80s]     
[   80s]         def teardown():
[   80s]             r.acl_deluser(username)
[   80s]         request.addfinalizer(teardown)
[   80s]     
[   80s]         # test enabled=False
[   80s]         assert r.acl_setuser(username, enabled=False, reset=True)
[   80s] >       assert r.acl_getuser(username) == {
[   80s]             'categories': ['-@all'],
[   80s]             'commands': [],
[   80s]             'enabled': False,
[   80s]             'flags': ['off'],
[   80s]             'keys': [],
[   80s]             'passwords': [],
[   80s]         }
[   80s] E       AssertionError: assert {'categories'...': False, ...} == {'categories'... ['off'], ...}
[   80s] E         Omitting 5 identical items, use -vv to show
[   80s] E         Differing items:
[   80s] E         {'flags': ['off', 'sanitize-payload']} != {'flags': ['off']}
[   80s] E         Left contains 1 more item:
[   80s] E         {'channels': []}
[   80s] E         Full diff:
[   80s] E           {...
[   80s] E         
[   80s] E         ...Full output truncated (12 lines hidden), use '-vv' to show
[   80s] 
[   80s] tests/test_commands.py:108: AssertionError
[   80s] _______________________ TestRedisCommands.test_acl_list ________________________
[   80s] 
[   80s] self = <tests.test_commands.TestRedisCommands object at 0x7fca4e658c50>
[   80s] r = Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>
[   80s] request = <FixtureRequest for <Function test_acl_list>>
[   80s] 
[   80s]     @skip_if_server_version_lt(REDIS_6_VERSION)
[   80s]     def test_acl_list(self, r, request):
[   80s]         username = 'redis-py-user'
[   80s]     
[   80s]         def teardown():
[   80s]             r.acl_deluser(username)
[   80s]         request.addfinalizer(teardown)
[   80s]     
[   80s]         assert r.acl_setuser(username, enabled=False, reset=True)
[   80s]         users = r.acl_list()
[   80s] >       assert 'user %s off -@all' % username in users
[   80s] E       AssertionError: assert ('user %s off -@all' % 'redis-py-user') in ['user default on nopass ~* &* +@all', 'user redis-py-user off sanitize-payload -@all']
[   80s] 
[   80s] tests/test_commands.py:196: AssertionError
[   80s] =========================== short test summary info ============================
[   80s] FAILED tests/test_commands.py::TestRedisCommands::test_acl_getuser_setuser - ...
[   80s] FAILED tests/test_commands.py::TestRedisCommands::test_acl_list - AssertionEr...
[   80s] ================== 2 failed, 472 passed, 1 skipped in 15.11s ===================

Complete build log with all details, versions of packages used and exact steps what we do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions