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
7 changes: 1 addition & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Build and test
# TEMPORARY: There are bugs in the upstream that cause the tests to fail
# so for now, this step will always succeed. This should be removed
# as soon as the tests can pass against a stable version of the
# upstream!
# run: pytest
run: pytest || true
run: pytest
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ plugins = ["pydantic.mypy"] # Enable mypy plugin for Pydantic model

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra --cov=cforge --cov-report=html:htmlcov --cov-report=term"
addopts = "-ra --cov=cforge --cov-report=html:htmlcov --cov-report=term --cov-fail-under=100"
testpaths = [ "tests",]
filterwarnings = [
"error", # Turn ALL warnings into errors by default
Expand All @@ -353,6 +353,10 @@ filterwarnings = [
"ignore: `regex` has been deprecated, please use `pattern` instead", # FastAPI upgraded needed upstream
"ignore: Extra environment options are deprecated. Use a preconfigured jinja2.Environment instead.", # Jinja2 deprecation upstream
"ignore:websockets.*is deprecated.*:DeprecationWarning", # websockets library upgrade needed upstream
"ignore:The argument signature for the.*PoolEvents.reset:sqlalchemy.exc.SADeprecationWarning", # sqlalchemy deprecation, fixed upstream in mcpgateway
"ignore: The HMAC key is 11 bytes long.*", # security warning from jwt
"ignore:unclosed database in.*:ResourceWarning", # sqlite3 connection leaked during mcpgateway import-time bootstrap
"ignore:Exception ignored in.*sqlite3.Connection.*:pytest.PytestUnraisableExceptionWarning", # same root cause as above
]

# ── fawltydeps ─────────────────────────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def authorized_mock_client(mock_client) -> Generator[None, None, None]:
yield mock_client


@pytest.fixture
@pytest.fixture(autouse=True)
def mock_settings() -> Generator[CLISettings, None, None]:
"""Provide a context manager for mocking settings."""
with tempfile.TemporaryDirectory(prefix="cforge_") as tmpdir:
Expand Down