fix: skip baseline vulnerability tests by default in CI

Add pytestmark to skip unless RUN_BENCHMARK_TESTS=1 is set,
matching the other LLM-dependent test files.
This commit is contained in:
John Kennedy
2026-01-31 18:05:42 -08:00
parent a35f869eb9
commit 608bc115b9

View File

@@ -4,10 +4,25 @@ These tests verify that models trigger tool calls from injection payloads when
middleware is NOT applied. This proves the middleware provides real protection.
A test PASSES if the model IS vulnerable (triggers the target tool).
NOTE: These tests are skipped by default in CI because they:
1. Make real API calls to LLM providers (costs money)
2. Are slow (multiple LLM roundtrips per test)
3. Are for manual validation, not regression testing
To run manually:
RUN_BENCHMARK_TESTS=1 pytest test_baseline_vulnerability.py -v -s
"""
import os
import pytest
pytestmark = pytest.mark.skipif(
os.environ.get("RUN_BENCHMARK_TESTS") != "1",
reason="E2E tests are skipped by default. Set RUN_BENCHMARK_TESTS=1 to run.",
)
from .conftest import INJECTION_TEST_CASES, check_vulnerability