Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,3 @@ reportUnusedImport = "warning" # Hygiene: warn, but don’t fail bui
[[tool.pyright.overrides]]
module = "tests/**"
reportMissingTypeStubs = "warning"

[tool.pytest.ini_options]
# Test configuration - completely suppress warnings including count
testpaths = ["tests"]
minversion = "8.0"
addopts = [
"--strict-markers",
"--strict-config",
"-ra", # Show extra test summary info
"--disable-warnings", # Disable all warnings during test runs
"-p", "no:warnings" # Disable warnings plugin completely
]
19 changes: 15 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pathlib import Path
from typing import Dict, Generator
from testcontainers.vault import VaultContainer # type: ignore
from testcontainers.core.wait_strategies import LogMessageWaitStrategy # type: ignore
from loguru import logger
import hvac # type: ignore

Expand All @@ -17,10 +18,20 @@

@pytest.fixture(scope="session")
def vault_container() -> Generator[VaultContainer, None, None]:
"""Create a Vault container for testing."""
with VaultContainer() as vault:
# Vault container is automatically ready when context manager exits
yield vault
"""Create a Vault container for testing with modern wait strategies."""
container = VaultContainer()

container.waiting_for(
LogMessageWaitStrategy("Vault server started!")
.with_startup_timeout(60)
.with_poll_interval(0.5)
)

container.start()
try:
yield container
finally:
container.stop()


@pytest.fixture(scope="session")
Expand Down