summaryrefslogtreecommitdiff
path: root/tests/conftest.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix protocol version checking (#2737)dvora-h2023-05-041-1/+1
|
* Reorganizing the parsers code, and add support for RESP3 (#2574)dvora-h2023-03-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reorganizing the parsers code * fix build package * fix imports * fix flake8 * add resp to Connection class * core commands * python resp3 parser * pipeline * async resp3 parser * some asymc tests * resp3 parser for async cluster * async commands tests * linters * linters * linters * fix ModuleNotFoundError * fix tests * fix assert_resp_response_in * fix command_getkeys in cluster * fail-fast false * version --------- Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
* Combine auto-concatenated strings (#2482)David Gilman2022-12-141-2/+2
|
* automatically reconnect pubsub when reading messages in blocking mode (#2281)Kristján Valur Jónsson2022-07-271-5/+15
| | | | | | | | | | | | | | | | * optimistic default info on test sessionstart. Makes test discovery work, even without a redis connection. * Add unittests verifying that (non-async) PubSub will automatically reconnect * Add tests for asyncio pubsub subsciription auto-reconnect * automatically connect for blocking reads (asyncio) * fix automatic connect on blocking pubsub read (non-async) * lint & format * Perform `connect()` call in PubSub code rather than `read_response`.
* late eval of the skip condition (#2248)Kristján Valur Jónsson2022-06-271-0/+2
| | | | | | | | | | * late eval of the skip condition at module import time, the REDIS_INFO dict hasn't been initialized. * Store REDIS_INFO in config object, where it is available from condition strings * Fix comparson of time You can't test rounded values for equalness, since they may fall each on a different side of 0.5. It is better to test their absolute difference for a certain tolerance, in this case 1.0 which is the intent of the original round.
* Add Async RedisCluster (#2099)Utkarsh Gupta2022-05-081-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy Cluster Client, Commands, Commands Parser, Tests for asyncio * Async Cluster Tests: Async/Await * Add Async RedisCluster * cluster: use ERRORS_ALLOW_RETRY from self.__class__ * async_cluster: rework redis_connection, initialize, & close - move redis_connection from NodesManager to ClusterNode & handle all related logic in ClusterNode class - use Locks while initializing or closing - in case of error, close connections instead of instantly reinitializing - create ResourceWarning instead of manually deleting client object - use asyncio.gather to run commands/initialize/close in parallel - inline single use functions - fix test_acl_log for py3.6 * async_cluster: add types * async_cluster: add docs * docs: update sphinx & add sphinx_autodoc_typehints * async_cluster: move TargetNodesT to cluster module * async_cluster/commands: inherit commands from sync class if possible * async_cluster: add benchmark script with aredis & aioredis-cluster * async_cluster: remove logging * async_cluster: inline functions * async_cluster: manage Connection instead of Redis Client * async_cluster/commands: optimize parser * async_cluster: use ensure_future & generators for gather * async_conn: optimize * async_cluster: optimize determine_slot * async_cluster: optimize determine_nodes * async_cluster/parser: optimize _get_moveable_keys * async_cluster: inlined check_slots_coverage * async_cluster: update docstrings * async_cluster: add concurrent test & use read_response/_update_moved_slots without lock Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Clean up test supoort enterprise environments (#2082)dvora-h2022-04-041-3/+3
| | | | | * skip tests on enterprise * delete dping implementation
* Add support for SEARCH commands in cluster (#2042)dvora-h2022-03-141-1/+1
| | | | | | | * Add support for SEARCH commands in cluster * delete json tests mark & list search commands * linters
* Add support for Redis 7 functions (#1998)dvora-h2022-02-221-1/+3
| | | | | | | | | | | | | | | | | | | * add function support * linters * test fcall * decode reponses for unstable_r * linters * fix evalsho_ro test * fix eval_ro test * add response callbaks * linters
* Add Async Support (#1899)Andrew Chen Wang2022-02-221-7/+72
| | | | Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
* adding cluster env timeout time (#1908)v4.1.2Chayim2022-01-271-1/+1
|
* Support test with redis unstable docker (#1850)dvora-h2022-01-041-0/+16
|
* OCSP stapling support (#1820)Chayim2021-12-261-0/+18
|
* Support for password-encrypted SSL private keys (#1782)Chayim2021-12-161-1/+16
| | | Adding support for SSL private keys with a password. This PR also adds support for future SSL tests.
* Removing distutils from tests (#1773)Chayim2021-12-081-4/+4
| | | Co-authored-by: Bar Shaul <88437685+barshaul@users.noreply.github.com>
* Added support for MONITOR in clusters (#1756)Bar Shaul2021-12-021-9/+11
|
* Added black and isort (#1734)Anas2021-11-301-77/+91
|
* Pyupgrade + flynt + f-strings (#1759)Aarni Koskela2021-11-301-11/+9
| | | @akx Thank you so much for this! Thanks again for introducing me to a new tool that I'm sliding into my workflow as well.
* RedisJSON 2.0.4 behaviour support (#1747)Chayim2021-11-251-3/+2
|
* Adding RedisCluster client to support Redis Cluster Mode (#1660)Bar Shaul2021-11-251-14/+81
| | | | Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Anas <anas.el.amraoui@live.com>
* Removing command on initial connections (#1722)v4.0.1Chayim2021-11-171-1/+2
|
* Unit tests fixes for compatibility (#1703)Chayim2021-11-141-5/+5
|
* Fixes to allow --redis-url to pass through all tests (#1700)Chayim2021-11-111-0/+18
|
* Unit test fixes to carry pytest options through all tests (#1696)Chayim2021-11-101-7/+13
|
* Support for json multipath ($) (#1663)Chayim2021-11-041-1/+2
|
* Adding support for redisearch (#1640)Chayim2021-10-251-3/+12
|
* redisjson support (#1636)Chayim2021-10-251-0/+33
|
* Removing packaging dependency (#1626)Chayim2021-10-191-4/+4
|
* Removing the REDIS_6_VERSION placeholder (#1582)Chayim2021-10-111-6/+0
|
* CLIENT REPLY support, available since redis 3.2.0 (#1581)Chayim2021-09-301-0/+6
|
* Use Version instead of StrictVersion since distutils is deprecated. (#1552)Karthikeyan Singaravelan2021-08-291-4/+4
|
* Add retry mechanism with backoff (#1494)nbraun-amazon2021-08-181-0/+3
|
* Added the ACL LOG command available in Redis 6Andy McCurdy2020-08-191-8/+21
| | | | | | | | | `acl_log()` returns a list of dictionaries, each describing a log entry. `acl_log_reset()` instructs the server to truncate the log. Thanks @2014BDuck Fixes #1307
* Remove support for end-of-life Python 2.7 (#1318)Jon Dufresne2020-08-061-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove support for end-of-life Python 2.7 Python 2.7 is end of life. It is no longer receiving bug fixes, including for security issues. Python 2.7 went EOL on 2020-01-01. For additional details on support Python versions, see: Supported: https://devguide.python.org/#status-of-python-branches EOL: https://devguide.python.org/devcycle/#end-of-life-branches Removing support for EOL Pythons will reduce testing and maintenance resources while allowing the library to move towards a modern Python 3 style. Python 2.7 users can continue to use the previous version of redis-py. Was able to simplify the code: - Removed redis._compat module - Removed __future__ imports - Removed object from class definition (all classes are new style) - Removed long (Python 3 unified numeric types) - Removed deprecated __nonzero__ method - Use simpler Python 3 super() syntax - Use unified OSError exception - Use yield from syntax Co-authored-by: Andy McCurdy <andy@andymccurdy.com>
* Use the existing --redis-url param to get master hostAndrew Brookins2020-07-101-9/+7
|
* Fix flake8 errorsAndrew Brookins2020-07-091-2/+0
|
* Pass the master hostname to testsAndrew Brookins2020-07-091-1/+6
|
* WIP on base imageAndrew Brookins2020-07-091-2/+9
|
* constant for redis 6 RC candidates in tests.Andy McCurdy2020-03-121-0/+6
| | | | replace with a '6.0.0' literal when Redis 6 is GA
* Clear pipeline watch state after execNick Gaya2020-03-101-0/+21
|
* Enable warnings during tests and fix discovered cases (#1283)Jon Dufresne2020-02-121-2/+4
| | | | | | Helps identify problematic or buggy code. When a warning is displayed, it should be analyzed and fixed. The r and r2 fixture now close the client after the test is complete.
* Ability to create a client that uses a single connectionAndy McCurdy2019-07-231-12/+10
| | | | | | | | | | | | | This has multiple uses: * Single connection clients will not be considered threadsafe. This means certain settings could temporarily be adjusted. For example, a context manager could temporarily modify the encoding behavior for a set of commands. * We can introduce more thorough health checks that only happen when a connection is handed out from the connection pool. * Workloads that issue many commands to Redis should be slightly faster. Prior to this change, the client must retrieve a connection from the pool for each command.
* Add redis_url cmdline argument for tests (#1170)Grygorii Iermolenko2019-06-061-31/+46
| | | Users can now specify --redis-url when running the test suite to choose a specific server.
* Merge pull request #972 from lamby/dont-assume-64-bit-server-in-testsAndy McCurdy2019-01-271-7/+14
|\ | | | | Skip 64-bit specific tests. (Closes: #899)
| * Skip 64-bit specific tests. (Closes: #899)Chris Lamb2018-11-161-7/+14
| | | | | | | | Signed-off-by: Chris Lamb <lamby@debian.org>
* | the fix to TimeoutErrors had a side affect on test teardownsAndy McCurdy2019-01-271-1/+6
| |
* | Code review fixesTheo Despoudis2018-12-061-2/+1
| | | | | | | | Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
* | Add client kill with filterTheo Despoudis2018-12-041-0/+9
|/ | | | Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
* remove legacy Redis classAndy McCurdy2018-11-131-5/+0
| | | | | | | | | | | | | | | | | | | redis-py maintained backwards compatibility by keeping the old "Redis" class around for quite some time. While no doubt a convenience for folks who relied on it, the presence of both Redis and StrictRedis causes a number of support issues and general confusion. With 3.0, we're breaking a few things to make redis-py better going forward. This change removes the old Redis class. We also renamed the StrictRedis class to Redis and aliased StrictRedis to Redis. For people that have been using StrictRedis, this should not change anything. You can continue doing things as you are. People still using the legacy Redis class will need to update the argument order for the SETEX, LREM and ZADD commands. Additionally, the return values for TTL and PTTL now return the integer values -1 when a key exists but has no expire time and -2 when a key does not exist. Previously these cases returned a None value in the Redis class.
* GEOPOS returns different values from redis 3.2 to redis 4.0Andy McCurdy2017-08-151-0/+5
| | | | | update test suite to test the appropriate return type based on server version