487 lines
16 KiB
Diff
487 lines
16 KiB
Diff
diff --git a/tests/aio/test_storage.py b/tests/aio/test_storage.py
|
|
index 1040d18..deecd9b 100644
|
|
--- a/tests/aio/test_storage.py
|
|
+++ b/tests/aio/test_storage.py
|
|
@@ -95,102 +95,6 @@ class TestBaseStorage:
|
|
"uri, args, expected_instance, fixture",
|
|
[
|
|
pytest.param("async+memory://", {}, MemoryStorage, None, id="in-memory"),
|
|
- pytest.param(
|
|
- "async+redis://localhost:7379",
|
|
- {},
|
|
- RedisStorage,
|
|
- pytest.lazy_fixture("redis_basic"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+unix:///tmp/limits.redis.sock",
|
|
- {},
|
|
- RedisStorage,
|
|
- pytest.lazy_fixture("redis_uds"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis-uds",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+unix://:password/tmp/limits.redis.sock",
|
|
- {},
|
|
- RedisStorage,
|
|
- pytest.lazy_fixture("redis_uds"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis-uds-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+memcached://localhost:22122",
|
|
- {},
|
|
- MemcachedStorage,
|
|
- pytest.lazy_fixture("memcached"),
|
|
- marks=pytest.mark.memcached,
|
|
- id="memcached",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+memcached://localhost:22122,localhost:22123",
|
|
- {},
|
|
- MemcachedStorage,
|
|
- pytest.lazy_fixture("memcached_cluster"),
|
|
- marks=pytest.mark.memcached,
|
|
- id="memcached-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+sentinel://localhost:26379",
|
|
- {"service_name": "mymaster"},
|
|
- RedisSentinelStorage,
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+sentinel://localhost:26379/mymaster",
|
|
- {},
|
|
- RedisSentinelStorage,
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel-service-name-url",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+sentinel://:sekret@localhost:36379/mymaster",
|
|
- {"password": "sekret"},
|
|
- RedisSentinelStorage,
|
|
- pytest.lazy_fixture("redis_sentinel_auth"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://localhost:7001/",
|
|
- {},
|
|
- RedisClusterStorage,
|
|
- pytest.lazy_fixture("redis_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://:sekret@localhost:8400/",
|
|
- {},
|
|
- RedisClusterStorage,
|
|
- pytest.lazy_fixture("redis_auth_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+mongodb://localhost:37017/",
|
|
- {},
|
|
- MongoDBStorage,
|
|
- pytest.lazy_fixture("mongodb"),
|
|
- marks=pytest.mark.mongodb,
|
|
- id="mongodb",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+etcd://localhost:2379",
|
|
- {},
|
|
- EtcdStorage,
|
|
- pytest.lazy_fixture("etcd"),
|
|
- marks=pytest.mark.etcd,
|
|
- id="etcd",
|
|
- ),
|
|
],
|
|
)
|
|
class TestConcreteStorages:
|
|
diff --git a/tests/test_storage.py b/tests/test_storage.py
|
|
index 1b8c7b0..97dcee5 100644
|
|
--- a/tests/test_storage.py
|
|
+++ b/tests/test_storage.py
|
|
@@ -100,110 +100,6 @@ class TestBaseStorage:
|
|
"uri, args, expected_instance, fixture",
|
|
[
|
|
pytest.param("memory://", {}, MemoryStorage, None, id="in-memory"),
|
|
- pytest.param(
|
|
- "redis://localhost:7379",
|
|
- {},
|
|
- RedisStorage,
|
|
- pytest.lazy_fixture("redis_basic"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+unix:///tmp/limits.redis.sock",
|
|
- {},
|
|
- RedisStorage,
|
|
- pytest.lazy_fixture("redis_uds"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis-uds",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+unix://:password/tmp/limits.redis.sock",
|
|
- {},
|
|
- RedisStorage,
|
|
- pytest.lazy_fixture("redis_uds"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis-uds-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "memcached://localhost:22122",
|
|
- {},
|
|
- MemcachedStorage,
|
|
- pytest.lazy_fixture("memcached"),
|
|
- marks=pytest.mark.memcached,
|
|
- id="memcached",
|
|
- ),
|
|
- pytest.param(
|
|
- "memcached://localhost:22122,localhost:22123",
|
|
- {},
|
|
- MemcachedStorage,
|
|
- pytest.lazy_fixture("memcached_cluster"),
|
|
- marks=pytest.mark.memcached,
|
|
- id="memcached-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "memcached:///tmp/limits.memcached.sock",
|
|
- {},
|
|
- MemcachedStorage,
|
|
- pytest.lazy_fixture("memcached_uds"),
|
|
- marks=pytest.mark.memcached,
|
|
- id="memcached-uds",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+sentinel://localhost:26379",
|
|
- {"service_name": "mymaster"},
|
|
- RedisSentinelStorage,
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+sentinel://localhost:26379/mymaster",
|
|
- {},
|
|
- RedisSentinelStorage,
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel-service-name-url",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+sentinel://:sekret@localhost:36379/mymaster",
|
|
- {"password": "sekret"},
|
|
- RedisSentinelStorage,
|
|
- pytest.lazy_fixture("redis_sentinel_auth"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://localhost:7001/",
|
|
- {},
|
|
- RedisClusterStorage,
|
|
- pytest.lazy_fixture("redis_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://:sekret@localhost:8400/",
|
|
- {},
|
|
- RedisClusterStorage,
|
|
- pytest.lazy_fixture("redis_auth_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "mongodb://localhost:37017/",
|
|
- {},
|
|
- MongoDBStorage,
|
|
- pytest.lazy_fixture("mongodb"),
|
|
- marks=pytest.mark.mongodb,
|
|
- id="mongodb",
|
|
- ),
|
|
- pytest.param(
|
|
- "etcd://localhost:2379",
|
|
- {},
|
|
- EtcdStorage,
|
|
- pytest.lazy_fixture("etcd"),
|
|
- marks=pytest.mark.etcd,
|
|
- id="etcd",
|
|
- ),
|
|
],
|
|
)
|
|
class TestConcreteStorages:
|
|
diff --git a/tests/utils.py b/tests/utils.py
|
|
index 558d766..9dcb911 100644
|
|
--- a/tests/utils.py
|
|
+++ b/tests/utils.py
|
|
@@ -52,75 +52,6 @@ all_storage = pytest.mark.parametrize(
|
|
"uri, args, fixture",
|
|
[
|
|
pytest.param("memory://", {}, None, id="in-memory"),
|
|
- pytest.param(
|
|
- "redis://localhost:7379",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_basic"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis_basic",
|
|
- ),
|
|
- pytest.param(
|
|
- "memcached://localhost:22122",
|
|
- {},
|
|
- pytest.lazy_fixture("memcached"),
|
|
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
|
- id="memcached",
|
|
- ),
|
|
- pytest.param(
|
|
- "memcached://localhost:22122,localhost:22123",
|
|
- {},
|
|
- pytest.lazy_fixture("memcached_cluster"),
|
|
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
|
- id="memcached-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://localhost:7001/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://:sekret@localhost:8400/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_auth_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://localhost:8301",
|
|
- {
|
|
- "ssl": True,
|
|
- "ssl_cert_reqs": "required",
|
|
- "ssl_keyfile": "./tests/tls/client.key",
|
|
- "ssl_certfile": "./tests/tls/client.crt",
|
|
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
|
- },
|
|
- pytest.lazy_fixture("redis_ssl_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-ssl-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+sentinel://localhost:26379/mymaster",
|
|
- {"use_replicas": False},
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel",
|
|
- ),
|
|
- pytest.param(
|
|
- "mongodb://localhost:37017/",
|
|
- {},
|
|
- pytest.lazy_fixture("mongodb"),
|
|
- marks=pytest.mark.mongodb,
|
|
- id="mongodb",
|
|
- ),
|
|
- pytest.param(
|
|
- "etcd://localhost:2379",
|
|
- {},
|
|
- pytest.lazy_fixture("etcd"),
|
|
- marks=[pytest.mark.etcd, pytest.mark.flaky],
|
|
- id="etcd",
|
|
- ),
|
|
],
|
|
)
|
|
|
|
@@ -128,54 +59,6 @@ moving_window_storage = pytest.mark.parametrize(
|
|
"uri, args, fixture",
|
|
[
|
|
pytest.param("memory://", {}, None, id="in-memory"),
|
|
- pytest.param(
|
|
- "redis://localhost:7379",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_basic"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://localhost:7001/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://:sekret@localhost:8400/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_auth_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+cluster://localhost:8301",
|
|
- {
|
|
- "ssl": True,
|
|
- "ssl_cert_reqs": "required",
|
|
- "ssl_keyfile": "./tests/tls/client.key",
|
|
- "ssl_certfile": "./tests/tls/client.crt",
|
|
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
|
- },
|
|
- pytest.lazy_fixture("redis_ssl_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-ssl-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "redis+sentinel://localhost:26379/mymaster",
|
|
- {"use_replicas": False},
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel",
|
|
- ),
|
|
- pytest.param(
|
|
- "mongodb://localhost:37017/",
|
|
- {},
|
|
- pytest.lazy_fixture("mongodb"),
|
|
- marks=pytest.mark.mongodb,
|
|
- id="mongodb",
|
|
- ),
|
|
],
|
|
)
|
|
|
|
@@ -183,75 +66,6 @@ async_all_storage = pytest.mark.parametrize(
|
|
"uri, args, fixture",
|
|
[
|
|
pytest.param("async+memory://", {}, None, id="in-memory"),
|
|
- pytest.param(
|
|
- "async+redis://localhost:7379",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_basic"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+memcached://localhost:22122",
|
|
- {},
|
|
- pytest.lazy_fixture("memcached"),
|
|
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
|
- id="memcached",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+memcached://localhost:22122,localhost:22123",
|
|
- {},
|
|
- pytest.lazy_fixture("memcached_cluster"),
|
|
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
|
- id="memcached-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://localhost:7001/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://:sekret@localhost:8400/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_auth_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://localhost:8301",
|
|
- {
|
|
- "ssl": True,
|
|
- "ssl_cert_reqs": "required",
|
|
- "ssl_keyfile": "./tests/tls/client.key",
|
|
- "ssl_certfile": "./tests/tls/client.crt",
|
|
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
|
- },
|
|
- pytest.lazy_fixture("redis_ssl_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-ssl-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+sentinel://localhost:26379/mymaster",
|
|
- {"use_replicas": False},
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+mongodb://localhost:37017/",
|
|
- {},
|
|
- pytest.lazy_fixture("mongodb"),
|
|
- marks=pytest.mark.mongodb,
|
|
- id="mongodb",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+etcd://localhost:2379",
|
|
- {},
|
|
- pytest.lazy_fixture("etcd"),
|
|
- marks=[pytest.mark.etcd, pytest.mark.flaky],
|
|
- id="etcd",
|
|
- ),
|
|
],
|
|
)
|
|
|
|
@@ -259,53 +73,5 @@ async_moving_window_storage = pytest.mark.parametrize(
|
|
"uri, args, fixture",
|
|
[
|
|
pytest.param("async+memory://", {}, None, id="in-memory"),
|
|
- pytest.param(
|
|
- "async+redis://localhost:7379",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_basic"),
|
|
- marks=pytest.mark.redis,
|
|
- id="redis",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://localhost:7001/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://:sekret@localhost:8400/",
|
|
- {},
|
|
- pytest.lazy_fixture("redis_auth_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-cluster-auth",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+cluster://localhost:8301",
|
|
- {
|
|
- "ssl": True,
|
|
- "ssl_cert_reqs": "required",
|
|
- "ssl_keyfile": "./tests/tls/client.key",
|
|
- "ssl_certfile": "./tests/tls/client.crt",
|
|
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
|
- },
|
|
- pytest.lazy_fixture("redis_ssl_cluster"),
|
|
- marks=pytest.mark.redis_cluster,
|
|
- id="redis-ssl-cluster",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+redis+sentinel://localhost:26379/mymaster",
|
|
- {"use_replicas": False},
|
|
- pytest.lazy_fixture("redis_sentinel"),
|
|
- marks=pytest.mark.redis_sentinel,
|
|
- id="redis-sentinel",
|
|
- ),
|
|
- pytest.param(
|
|
- "async+mongodb://localhost:37017/",
|
|
- {},
|
|
- pytest.lazy_fixture("mongodb"),
|
|
- marks=pytest.mark.mongodb,
|
|
- id="mongodb",
|
|
- ),
|
|
],
|
|
)
|