Fix redis ssl issues 2
This commit is contained in:
@@ -62,16 +62,14 @@ async def test_deduplication_in_container():
|
||||
|
||||
async def start(self):
|
||||
# Connect to Redis for deduplication testing
|
||||
import ssl
|
||||
connection_kwargs = {}
|
||||
if self.config.REDIS_URL and self.config.REDIS_URL.startswith("rediss://"):
|
||||
connection_kwargs["ssl_cert_reqs"] = ssl.CERT_NONE
|
||||
self.redis = await aioredis.from_url(self.config.REDIS_URL, **connection_kwargs)
|
||||
from shared.redis_utils import RedisConnectionManager
|
||||
self._redis_manager = await RedisConnectionManager.create(self.config.REDIS_URL)
|
||||
self.redis = self._redis_manager.get_client()
|
||||
print(f"✅ Connected to Redis for testing")
|
||||
|
||||
async def stop(self):
|
||||
if self.redis:
|
||||
await self.redis.aclose()
|
||||
if hasattr(self, '_redis_manager') and self._redis_manager:
|
||||
await self._redis_manager.close()
|
||||
|
||||
# Create test service
|
||||
service = TestInventoryAlertService()
|
||||
|
||||
Reference in New Issue
Block a user