- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
13 lines
850 B
Markdown
13 lines
850 B
Markdown
---
|
|
id: 2583e4fe-772e-4c68-9dd0-9b415f883c0d
|
|
type: solution
|
|
title: "Testcontainers for pytest auto-start"
|
|
tags: [mantimon-tcg, python, pytest, testcontainers, docker, fix]
|
|
importance: 0.7
|
|
confidence: 0.8
|
|
created: "2026-01-28T22:51:44.046249+00:00"
|
|
updated: "2026-01-28T22:51:44.046249+00:00"
|
|
---
|
|
|
|
Switched from requiring manual docker-compose up to testcontainers for automatic container management in tests. Key fixes: 1) Auto-detect Docker Desktop socket at ~/.docker/desktop/docker.sock, 2) Disable Ryuk with TESTCONTAINERS_RYUK_DISABLED=true, 3) Create shared tests/conftest.py with session-scoped postgres_container and redis_container fixtures, 4) Expose redis_url fixture for tests needing to create their own clients (avoids event loop issues), 5) Fix logger capture test - pytest disables loggers, need to set registry_logger.disabled=False
|