compact and deduplicate test suite

- Extract generate_storage_tests! macro for shared CRUD tests across memory/postgresql backends
- Move merge tests to mod.rs (testing default trait method once)
- Consolidate signal analyzer tests into table-driven tests
- Extract shared fixtures in router test files
- Parametrize Python CLI tests
- Remove dead tests (test_skip_version_check_env_var, test_arch_agent_config_default)
- Extract SSE event test helpers in streaming_response
This commit is contained in:
Adil Hafeez 2026-03-15 08:34:29 +00:00
parent 785bf7e021
commit c4634d0034
10 changed files with 822 additions and 1490 deletions

View file

@ -52,16 +52,13 @@ class TestCheckVersionStatus:
assert status["is_outdated"] is False
assert status["message"] is None
def test_major_version_outdated(self):
status = check_version_status("0.4.1", "1.0.0")
assert status["is_outdated"] is True
def test_minor_version_outdated(self):
status = check_version_status("0.4.1", "0.5.0")
assert status["is_outdated"] is True
def test_patch_version_outdated(self):
status = check_version_status("0.4.1", "0.4.2")
@pytest.mark.parametrize("current,latest", [
("0.4.1", "1.0.0"), # major
("0.4.1", "0.5.0"), # minor
("0.4.1", "0.4.2"), # patch
], ids=["major", "minor", "patch"])
def test_version_outdated(self, current, latest):
status = check_version_status(current, latest)
assert status["is_outdated"] is True
def test_latest_is_none(self):
@ -154,10 +151,3 @@ class TestVersionCheckIntegration:
assert status["is_outdated"] is False
def test_skip_version_check_env_var(self, monkeypatch):
"""Test that PLANO_SKIP_VERSION_CHECK skips the check."""
monkeypatch.setenv("PLANO_SKIP_VERSION_CHECK", "1")
import os
assert os.environ.get("PLANO_SKIP_VERSION_CHECK") == "1"