From ea95a009dffb81e667e5dfac466ea3dee3541eb4 Mon Sep 17 00:00:00 2001 From: anti Date: Thu, 23 Apr 2026 21:34:25 -0400 Subject: [PATCH] refactor(tests): move flat tests/*.py into per-subsystem subfolders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Groups every flat test_*.py under the module it exercises, matching the existing tests/{profiler,sniffer,prober,collector,correlation,cli,web, topology,swarm,bus,updater,api,docker,geoip,...} layout. New folders: services/, fleet/, config/, logging/, db/ (+ db/mysql/), telemetry/, mutator/, core/. Path-dependent __file__ references bumped an extra .parent in three files that moved one level deeper: - tests/sniffer/test_sniffer_ja3.py (template path) - tests/services/test_ssh_capture_emit.py (template path) - tests/cli/test_mode_gating.py (REPO root) - tests/web/test_env_lazy_jwt.py (repo var) Also drops two SQLite runtime artifacts (test_decnet.db-{shm,wal}) that were leaking into the repo from a previous test run. Fixes two test_service_isolation cases that patched asyncio.sleep (no longer on the profiler main-loop hot path — same pre-existing bug I fixed earlier in test_attacker_worker.py) by patching asyncio.wait_for and passing interval=0. --- tests/{ => cli}/test_cli.py | 0 tests/{ => cli}/test_cli_db_reset.py | 0 tests/{ => cli}/test_cli_service_pool.py | 0 tests/{ => cli}/test_embedded_workers.py | 0 tests/{ => cli}/test_mode_gating.py | 2 +- tests/{ => collector}/test_collector.py | 0 .../test_collector_thread_pool.py | 0 tests/config/__init__.py | 0 tests/{ => config}/test_config.py | 0 tests/{ => config}/test_config_ini.py | 0 tests/{ => config}/test_ini_loader.py | 0 tests/{ => config}/test_ini_spaces.py | 0 tests/{ => config}/test_ini_validation.py | 0 tests/core/__init__.py | 0 tests/{ => core}/test_build.py | 0 tests/{ => core}/test_fingerprinting.py | 0 tests/{ => core}/test_network.py | 0 tests/{ => core}/test_os_fingerprint.py | 0 tests/{ => core}/test_privdrop.py | 0 tests/{ => correlation}/test_bounty_dedup.py | 0 tests/{ => correlation}/test_correlation.py | 0 tests/db/__init__.py | 0 tests/db/mysql/__init__.py | 0 .../mysql}/test_mysql_histogram_sql.py | 0 tests/{ => db/mysql}/test_mysql_migration.py | 0 .../{ => db/mysql}/test_mysql_url_builder.py | 0 tests/{ => db}/test_base_repo.py | 0 tests/{ => db}/test_factory.py | 0 tests/fleet/__init__.py | 0 tests/{ => fleet}/test_archetypes.py | 0 tests/{ => fleet}/test_auto_spawn.py | 0 tests/{ => fleet}/test_composer.py | 0 tests/{ => fleet}/test_deployer.py | 0 tests/{ => fleet}/test_fleet.py | 0 tests/{ => fleet}/test_fleet_singleton.py | 0 tests/logging/__init__.py | 0 tests/{ => logging}/test_file_handler.py | 0 .../{ => logging}/test_inode_aware_handler.py | 0 tests/{ => logging}/test_log_file_mount.py | 0 tests/{ => logging}/test_logging.py | 0 tests/{ => logging}/test_logging_forwarder.py | 0 tests/{ => logging}/test_syslog_formatter.py | 0 tests/mutator/__init__.py | 0 tests/{ => mutator}/test_mutator.py | 0 tests/{ => prober}/test_prober_bounty.py | 0 tests/{ => prober}/test_prober_hassh.py | 0 tests/{ => prober}/test_prober_jarm.py | 0 tests/{ => prober}/test_prober_tcpfp.py | 0 tests/{ => prober}/test_prober_worker.py | 0 tests/{ => profiler}/test_attacker_worker.py | 0 .../test_profiler_behavioral.py | 0 tests/{ => profiler}/test_session_profile.py | 0 tests/services/__init__.py | 0 tests/{ => services}/test_custom_service.py | 0 .../{ => services}/test_service_isolation.py | 20 ++++++++++++------ tests/{ => services}/test_services.py | 0 tests/{ => services}/test_smtp_relay.py | 0 tests/{ => services}/test_smtp_targets.py | 0 tests/{ => services}/test_ssh.py | 0 tests/{ => services}/test_ssh_capture_emit.py | 2 +- tests/{ => services}/test_ssh_stealth.py | 0 tests/{ => sniffer}/test_sniffer_ja3.py | 2 +- tests/{ => sniffer}/test_sniffer_p0f.py | 0 .../{ => sniffer}/test_sniffer_retransmit.py | 0 .../test_sniffer_tcp_fingerprint.py | 0 tests/{ => sniffer}/test_sniffer_worker.py | 0 tests/telemetry/__init__.py | 0 tests/{ => telemetry}/test_telemetry.py | 0 tests/test_decnet.db-shm | Bin 32768 -> 0 bytes tests/test_decnet.db-wal | Bin 65952 -> 0 bytes tests/{ => web}/test_admin_seed.py | 0 tests/{ => web}/test_api_attackers.py | 0 tests/{ => web}/test_auth_async.py | 0 tests/{ => web}/test_env_lazy_jwt.py | 2 +- tests/{ => web}/test_health_config_cache.py | 0 tests/{ => web}/test_ingester.py | 0 tests/{ => web}/test_router_cache.py | 0 tests/{ => web}/test_web_api.py | 0 78 files changed, 18 insertions(+), 10 deletions(-) rename tests/{ => cli}/test_cli.py (100%) rename tests/{ => cli}/test_cli_db_reset.py (100%) rename tests/{ => cli}/test_cli_service_pool.py (100%) rename tests/{ => cli}/test_embedded_workers.py (100%) rename tests/{ => cli}/test_mode_gating.py (98%) rename tests/{ => collector}/test_collector.py (100%) rename tests/{ => collector}/test_collector_thread_pool.py (100%) create mode 100644 tests/config/__init__.py rename tests/{ => config}/test_config.py (100%) rename tests/{ => config}/test_config_ini.py (100%) rename tests/{ => config}/test_ini_loader.py (100%) rename tests/{ => config}/test_ini_spaces.py (100%) rename tests/{ => config}/test_ini_validation.py (100%) create mode 100644 tests/core/__init__.py rename tests/{ => core}/test_build.py (100%) rename tests/{ => core}/test_fingerprinting.py (100%) rename tests/{ => core}/test_network.py (100%) rename tests/{ => core}/test_os_fingerprint.py (100%) rename tests/{ => core}/test_privdrop.py (100%) rename tests/{ => correlation}/test_bounty_dedup.py (100%) rename tests/{ => correlation}/test_correlation.py (100%) create mode 100644 tests/db/__init__.py create mode 100644 tests/db/mysql/__init__.py rename tests/{ => db/mysql}/test_mysql_histogram_sql.py (100%) rename tests/{ => db/mysql}/test_mysql_migration.py (100%) rename tests/{ => db/mysql}/test_mysql_url_builder.py (100%) rename tests/{ => db}/test_base_repo.py (100%) rename tests/{ => db}/test_factory.py (100%) create mode 100644 tests/fleet/__init__.py rename tests/{ => fleet}/test_archetypes.py (100%) rename tests/{ => fleet}/test_auto_spawn.py (100%) rename tests/{ => fleet}/test_composer.py (100%) rename tests/{ => fleet}/test_deployer.py (100%) rename tests/{ => fleet}/test_fleet.py (100%) rename tests/{ => fleet}/test_fleet_singleton.py (100%) create mode 100644 tests/logging/__init__.py rename tests/{ => logging}/test_file_handler.py (100%) rename tests/{ => logging}/test_inode_aware_handler.py (100%) rename tests/{ => logging}/test_log_file_mount.py (100%) rename tests/{ => logging}/test_logging.py (100%) rename tests/{ => logging}/test_logging_forwarder.py (100%) rename tests/{ => logging}/test_syslog_formatter.py (100%) create mode 100644 tests/mutator/__init__.py rename tests/{ => mutator}/test_mutator.py (100%) rename tests/{ => prober}/test_prober_bounty.py (100%) rename tests/{ => prober}/test_prober_hassh.py (100%) rename tests/{ => prober}/test_prober_jarm.py (100%) rename tests/{ => prober}/test_prober_tcpfp.py (100%) rename tests/{ => prober}/test_prober_worker.py (100%) rename tests/{ => profiler}/test_attacker_worker.py (100%) rename tests/{ => profiler}/test_profiler_behavioral.py (100%) rename tests/{ => profiler}/test_session_profile.py (100%) create mode 100644 tests/services/__init__.py rename tests/{ => services}/test_custom_service.py (100%) rename tests/{ => services}/test_service_isolation.py (96%) rename tests/{ => services}/test_services.py (100%) rename tests/{ => services}/test_smtp_relay.py (100%) rename tests/{ => services}/test_smtp_targets.py (100%) rename tests/{ => services}/test_ssh.py (100%) rename tests/{ => services}/test_ssh_capture_emit.py (98%) rename tests/{ => services}/test_ssh_stealth.py (100%) rename tests/{ => sniffer}/test_sniffer_ja3.py (99%) rename tests/{ => sniffer}/test_sniffer_p0f.py (100%) rename tests/{ => sniffer}/test_sniffer_retransmit.py (100%) rename tests/{ => sniffer}/test_sniffer_tcp_fingerprint.py (100%) rename tests/{ => sniffer}/test_sniffer_worker.py (100%) create mode 100644 tests/telemetry/__init__.py rename tests/{ => telemetry}/test_telemetry.py (100%) delete mode 100644 tests/test_decnet.db-shm delete mode 100644 tests/test_decnet.db-wal rename tests/{ => web}/test_admin_seed.py (100%) rename tests/{ => web}/test_api_attackers.py (100%) rename tests/{ => web}/test_auth_async.py (100%) rename tests/{ => web}/test_env_lazy_jwt.py (96%) rename tests/{ => web}/test_health_config_cache.py (100%) rename tests/{ => web}/test_ingester.py (100%) rename tests/{ => web}/test_router_cache.py (100%) rename tests/{ => web}/test_web_api.py (100%) diff --git a/tests/test_cli.py b/tests/cli/test_cli.py similarity index 100% rename from tests/test_cli.py rename to tests/cli/test_cli.py diff --git a/tests/test_cli_db_reset.py b/tests/cli/test_cli_db_reset.py similarity index 100% rename from tests/test_cli_db_reset.py rename to tests/cli/test_cli_db_reset.py diff --git a/tests/test_cli_service_pool.py b/tests/cli/test_cli_service_pool.py similarity index 100% rename from tests/test_cli_service_pool.py rename to tests/cli/test_cli_service_pool.py diff --git a/tests/test_embedded_workers.py b/tests/cli/test_embedded_workers.py similarity index 100% rename from tests/test_embedded_workers.py rename to tests/cli/test_embedded_workers.py diff --git a/tests/test_mode_gating.py b/tests/cli/test_mode_gating.py similarity index 98% rename from tests/test_mode_gating.py rename to tests/cli/test_mode_gating.py index 32060d4d..1b18b8a5 100644 --- a/tests/test_mode_gating.py +++ b/tests/cli/test_mode_gating.py @@ -10,7 +10,7 @@ from pathlib import Path import pytest -REPO = pathlib.Path(__file__).resolve().parent.parent +REPO = pathlib.Path(__file__).resolve().parent.parent.parent #DECNET_BIN = REPO / ".venv" / "bin" / "decnet" DECNET_BIN = Path(sys.executable).parent / "decnet" diff --git a/tests/test_collector.py b/tests/collector/test_collector.py similarity index 100% rename from tests/test_collector.py rename to tests/collector/test_collector.py diff --git a/tests/test_collector_thread_pool.py b/tests/collector/test_collector_thread_pool.py similarity index 100% rename from tests/test_collector_thread_pool.py rename to tests/collector/test_collector_thread_pool.py diff --git a/tests/config/__init__.py b/tests/config/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_config.py b/tests/config/test_config.py similarity index 100% rename from tests/test_config.py rename to tests/config/test_config.py diff --git a/tests/test_config_ini.py b/tests/config/test_config_ini.py similarity index 100% rename from tests/test_config_ini.py rename to tests/config/test_config_ini.py diff --git a/tests/test_ini_loader.py b/tests/config/test_ini_loader.py similarity index 100% rename from tests/test_ini_loader.py rename to tests/config/test_ini_loader.py diff --git a/tests/test_ini_spaces.py b/tests/config/test_ini_spaces.py similarity index 100% rename from tests/test_ini_spaces.py rename to tests/config/test_ini_spaces.py diff --git a/tests/test_ini_validation.py b/tests/config/test_ini_validation.py similarity index 100% rename from tests/test_ini_validation.py rename to tests/config/test_ini_validation.py diff --git a/tests/core/__init__.py b/tests/core/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_build.py b/tests/core/test_build.py similarity index 100% rename from tests/test_build.py rename to tests/core/test_build.py diff --git a/tests/test_fingerprinting.py b/tests/core/test_fingerprinting.py similarity index 100% rename from tests/test_fingerprinting.py rename to tests/core/test_fingerprinting.py diff --git a/tests/test_network.py b/tests/core/test_network.py similarity index 100% rename from tests/test_network.py rename to tests/core/test_network.py diff --git a/tests/test_os_fingerprint.py b/tests/core/test_os_fingerprint.py similarity index 100% rename from tests/test_os_fingerprint.py rename to tests/core/test_os_fingerprint.py diff --git a/tests/test_privdrop.py b/tests/core/test_privdrop.py similarity index 100% rename from tests/test_privdrop.py rename to tests/core/test_privdrop.py diff --git a/tests/test_bounty_dedup.py b/tests/correlation/test_bounty_dedup.py similarity index 100% rename from tests/test_bounty_dedup.py rename to tests/correlation/test_bounty_dedup.py diff --git a/tests/test_correlation.py b/tests/correlation/test_correlation.py similarity index 100% rename from tests/test_correlation.py rename to tests/correlation/test_correlation.py diff --git a/tests/db/__init__.py b/tests/db/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/db/mysql/__init__.py b/tests/db/mysql/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_mysql_histogram_sql.py b/tests/db/mysql/test_mysql_histogram_sql.py similarity index 100% rename from tests/test_mysql_histogram_sql.py rename to tests/db/mysql/test_mysql_histogram_sql.py diff --git a/tests/test_mysql_migration.py b/tests/db/mysql/test_mysql_migration.py similarity index 100% rename from tests/test_mysql_migration.py rename to tests/db/mysql/test_mysql_migration.py diff --git a/tests/test_mysql_url_builder.py b/tests/db/mysql/test_mysql_url_builder.py similarity index 100% rename from tests/test_mysql_url_builder.py rename to tests/db/mysql/test_mysql_url_builder.py diff --git a/tests/test_base_repo.py b/tests/db/test_base_repo.py similarity index 100% rename from tests/test_base_repo.py rename to tests/db/test_base_repo.py diff --git a/tests/test_factory.py b/tests/db/test_factory.py similarity index 100% rename from tests/test_factory.py rename to tests/db/test_factory.py diff --git a/tests/fleet/__init__.py b/tests/fleet/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_archetypes.py b/tests/fleet/test_archetypes.py similarity index 100% rename from tests/test_archetypes.py rename to tests/fleet/test_archetypes.py diff --git a/tests/test_auto_spawn.py b/tests/fleet/test_auto_spawn.py similarity index 100% rename from tests/test_auto_spawn.py rename to tests/fleet/test_auto_spawn.py diff --git a/tests/test_composer.py b/tests/fleet/test_composer.py similarity index 100% rename from tests/test_composer.py rename to tests/fleet/test_composer.py diff --git a/tests/test_deployer.py b/tests/fleet/test_deployer.py similarity index 100% rename from tests/test_deployer.py rename to tests/fleet/test_deployer.py diff --git a/tests/test_fleet.py b/tests/fleet/test_fleet.py similarity index 100% rename from tests/test_fleet.py rename to tests/fleet/test_fleet.py diff --git a/tests/test_fleet_singleton.py b/tests/fleet/test_fleet_singleton.py similarity index 100% rename from tests/test_fleet_singleton.py rename to tests/fleet/test_fleet_singleton.py diff --git a/tests/logging/__init__.py b/tests/logging/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_file_handler.py b/tests/logging/test_file_handler.py similarity index 100% rename from tests/test_file_handler.py rename to tests/logging/test_file_handler.py diff --git a/tests/test_inode_aware_handler.py b/tests/logging/test_inode_aware_handler.py similarity index 100% rename from tests/test_inode_aware_handler.py rename to tests/logging/test_inode_aware_handler.py diff --git a/tests/test_log_file_mount.py b/tests/logging/test_log_file_mount.py similarity index 100% rename from tests/test_log_file_mount.py rename to tests/logging/test_log_file_mount.py diff --git a/tests/test_logging.py b/tests/logging/test_logging.py similarity index 100% rename from tests/test_logging.py rename to tests/logging/test_logging.py diff --git a/tests/test_logging_forwarder.py b/tests/logging/test_logging_forwarder.py similarity index 100% rename from tests/test_logging_forwarder.py rename to tests/logging/test_logging_forwarder.py diff --git a/tests/test_syslog_formatter.py b/tests/logging/test_syslog_formatter.py similarity index 100% rename from tests/test_syslog_formatter.py rename to tests/logging/test_syslog_formatter.py diff --git a/tests/mutator/__init__.py b/tests/mutator/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_mutator.py b/tests/mutator/test_mutator.py similarity index 100% rename from tests/test_mutator.py rename to tests/mutator/test_mutator.py diff --git a/tests/test_prober_bounty.py b/tests/prober/test_prober_bounty.py similarity index 100% rename from tests/test_prober_bounty.py rename to tests/prober/test_prober_bounty.py diff --git a/tests/test_prober_hassh.py b/tests/prober/test_prober_hassh.py similarity index 100% rename from tests/test_prober_hassh.py rename to tests/prober/test_prober_hassh.py diff --git a/tests/test_prober_jarm.py b/tests/prober/test_prober_jarm.py similarity index 100% rename from tests/test_prober_jarm.py rename to tests/prober/test_prober_jarm.py diff --git a/tests/test_prober_tcpfp.py b/tests/prober/test_prober_tcpfp.py similarity index 100% rename from tests/test_prober_tcpfp.py rename to tests/prober/test_prober_tcpfp.py diff --git a/tests/test_prober_worker.py b/tests/prober/test_prober_worker.py similarity index 100% rename from tests/test_prober_worker.py rename to tests/prober/test_prober_worker.py diff --git a/tests/test_attacker_worker.py b/tests/profiler/test_attacker_worker.py similarity index 100% rename from tests/test_attacker_worker.py rename to tests/profiler/test_attacker_worker.py diff --git a/tests/test_profiler_behavioral.py b/tests/profiler/test_profiler_behavioral.py similarity index 100% rename from tests/test_profiler_behavioral.py rename to tests/profiler/test_profiler_behavioral.py diff --git a/tests/test_session_profile.py b/tests/profiler/test_session_profile.py similarity index 100% rename from tests/test_session_profile.py rename to tests/profiler/test_session_profile.py diff --git a/tests/services/__init__.py b/tests/services/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_custom_service.py b/tests/services/test_custom_service.py similarity index 100% rename from tests/test_custom_service.py rename to tests/services/test_custom_service.py diff --git a/tests/test_service_isolation.py b/tests/services/test_service_isolation.py similarity index 96% rename from tests/test_service_isolation.py rename to tests/services/test_service_isolation.py index d0092cc2..d82f125b 100644 --- a/tests/test_service_isolation.py +++ b/tests/services/test_service_isolation.py @@ -202,15 +202,19 @@ class TestAttackerWorkerIsolation: mock_repo.set_state = AsyncMock() iterations = 0 + real_wait_for = asyncio.wait_for - async def _controlled_sleep(seconds): + async def _controlled_wait_for(awaitable, timeout): nonlocal iterations iterations += 1 if iterations >= 3: + if asyncio.iscoroutine(awaitable): + awaitable.close() raise asyncio.CancelledError() + return await real_wait_for(awaitable, timeout) - with patch("decnet.profiler.worker.asyncio.sleep", side_effect=_controlled_sleep): - task = asyncio.create_task(attacker_profile_worker(mock_repo)) + with patch("decnet.profiler.worker.asyncio.wait_for", side_effect=_controlled_wait_for): + task = asyncio.create_task(attacker_profile_worker(mock_repo, interval=0)) with pytest.raises(asyncio.CancelledError): await task # Worker should have retried at least twice before we cancelled @@ -454,15 +458,19 @@ class TestCascadeIsolation: mock_repo.get_logs_after_id = AsyncMock(return_value=[]) iterations = 0 + real_wait_for = asyncio.wait_for - async def _controlled_sleep(seconds): + async def _controlled_wait_for(awaitable, timeout): nonlocal iterations iterations += 1 if iterations >= 3: + if asyncio.iscoroutine(awaitable): + awaitable.close() raise asyncio.CancelledError() + return await real_wait_for(awaitable, timeout) - with patch("decnet.profiler.worker.asyncio.sleep", side_effect=_controlled_sleep): - task = asyncio.create_task(attacker_profile_worker(mock_repo)) + with patch("decnet.profiler.worker.asyncio.wait_for", side_effect=_controlled_wait_for): + task = asyncio.create_task(attacker_profile_worker(mock_repo, interval=0)) with pytest.raises(asyncio.CancelledError): await task # Attacker should have run independently diff --git a/tests/test_services.py b/tests/services/test_services.py similarity index 100% rename from tests/test_services.py rename to tests/services/test_services.py diff --git a/tests/test_smtp_relay.py b/tests/services/test_smtp_relay.py similarity index 100% rename from tests/test_smtp_relay.py rename to tests/services/test_smtp_relay.py diff --git a/tests/test_smtp_targets.py b/tests/services/test_smtp_targets.py similarity index 100% rename from tests/test_smtp_targets.py rename to tests/services/test_smtp_targets.py diff --git a/tests/test_ssh.py b/tests/services/test_ssh.py similarity index 100% rename from tests/test_ssh.py rename to tests/services/test_ssh.py diff --git a/tests/test_ssh_capture_emit.py b/tests/services/test_ssh_capture_emit.py similarity index 98% rename from tests/test_ssh_capture_emit.py rename to tests/services/test_ssh_capture_emit.py index 1059d35a..979a1320 100644 --- a/tests/test_ssh_capture_emit.py +++ b/tests/services/test_ssh_capture_emit.py @@ -19,7 +19,7 @@ import pytest from decnet.collector.worker import parse_rfc5424 -_TEMPLATE_DIR = Path(__file__).resolve().parent.parent / "decnet" / "templates" / "ssh" +_TEMPLATE_DIR = Path(__file__).resolve().parent.parent.parent / "decnet" / "templates" / "ssh" _EMIT_SCRIPT = _TEMPLATE_DIR / "emit_capture.py" diff --git a/tests/test_ssh_stealth.py b/tests/services/test_ssh_stealth.py similarity index 100% rename from tests/test_ssh_stealth.py rename to tests/services/test_ssh_stealth.py diff --git a/tests/test_sniffer_ja3.py b/tests/sniffer/test_sniffer_ja3.py similarity index 99% rename from tests/test_sniffer_ja3.py rename to tests/sniffer/test_sniffer_ja3.py index 7f5b2250..2cfa4cd1 100644 --- a/tests/test_sniffer_ja3.py +++ b/tests/sniffer/test_sniffer_ja3.py @@ -18,7 +18,7 @@ import pytest # ─── Import sniffer module with mocked syslog_bridge ───────────────────────── -_SNIFFER_DIR = str(Path(__file__).parent.parent / "decnet" / "templates" / "sniffer") +_SNIFFER_DIR = str(Path(__file__).parent.parent.parent / "decnet" / "templates" / "sniffer") def _load_sniffer(): """Load decnet/templates/sniffer/server.py with syslog_bridge stubbed out.""" diff --git a/tests/test_sniffer_p0f.py b/tests/sniffer/test_sniffer_p0f.py similarity index 100% rename from tests/test_sniffer_p0f.py rename to tests/sniffer/test_sniffer_p0f.py diff --git a/tests/test_sniffer_retransmit.py b/tests/sniffer/test_sniffer_retransmit.py similarity index 100% rename from tests/test_sniffer_retransmit.py rename to tests/sniffer/test_sniffer_retransmit.py diff --git a/tests/test_sniffer_tcp_fingerprint.py b/tests/sniffer/test_sniffer_tcp_fingerprint.py similarity index 100% rename from tests/test_sniffer_tcp_fingerprint.py rename to tests/sniffer/test_sniffer_tcp_fingerprint.py diff --git a/tests/test_sniffer_worker.py b/tests/sniffer/test_sniffer_worker.py similarity index 100% rename from tests/test_sniffer_worker.py rename to tests/sniffer/test_sniffer_worker.py diff --git a/tests/telemetry/__init__.py b/tests/telemetry/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_telemetry.py b/tests/telemetry/test_telemetry.py similarity index 100% rename from tests/test_telemetry.py rename to tests/telemetry/test_telemetry.py diff --git a/tests/test_decnet.db-shm b/tests/test_decnet.db-shm deleted file mode 100644 index 7f8518733a9e32e86bba8045a9489f5dff30471e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI)yKMqN5CG8Ok3W1QClo-0fF!(rA=W^-};-t0csv+ZO$AAha(%jwTzzWg2ibAKLniGDs$ z4{=?-m;86sGaH%3do#0@dF|`3r-!xM-doL2f&c*m1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZpmYMY zyl0|Yx~?@$;28q-=*8d}2RVa4=>!_lkK(o?L7;j9t$3~8&?Y8u5opI72?7-r=)`+P zCpR{M7X$D>p1hUJKpl_YYq2)78uHZx|^=z%h&(? z&W5iZymtDr;i2BRu8^^GHYMxCO}93gxb1|{z9#x@X4}j)wtZb`f&Mh&l`U7hYvS5p zzORWsVp?nE){f8{GzdTd0uX=z1Rwwb2tWV=5V(^9gC>i;t&Jbi<~O(y9%VMJ3V zbBY>WxM=PUO8$^ULjE1S5?Ro9vnr>QEp*G)=URBHy}6k`+-Af~rpGn*ZK~Lsts$FN zkt!`7BZ2;q^tcoxgTX+bKR7~qq!Ho|hXw-uG)SM+AKFrNOFf=aG+j<*$WHn?LxDbt z?38x-!@VKW9S#QRb`iF6IOOjetR5kzL=y!PlJ?x-88jt36^|;5^iZZ0RgdU}%wnBn zU6-Q?B^!xn773M=^O0m+T`bU8TuH{XMPj71apTeJyjtl&$IkQT#|zFT5B>7qOS}JM z=j?Ms3G5yk1Rwwb2tWV=5P$##AOHafKmY^00Izz00bZa0SG_<0uWdrP%)1{_+jGxgR@62EHRJ3QWk^d8{FDFf~IR+{hDcG z9>JRFrrD+wWl?b#0uX=z1Rwwb2tWV=5U3r2nTO0)yWP$oYBloBb2LX=Gj8fCGR}=v zH%K|pOe_$vqRqvURH7%dc#v&84HnB*Gb~c@yi&jcj z-!v6h@=A77^|+~=rbnU^vO2CrO3y)d3=H&2{{H!Vcj5Yk@78*YeVd)<;%ZDeFqgeA z=k&C(95HwzF5`!#wQlLIqS3XU9%l{gSi?Mm@~I59HIKkJr!VCTd~oG*kLk$8FOV-# zJAZ<)rx1Vu1Rwwb2tWV=5P$##AW+i+Y;b74zQCZ~`1Q4u!p2o>WwBHtyN3n=2tWV= z5P$##AOHafKmY;|fWXQWU~>X2rF?M$ZeSz}p3bML|w_IPqvU*)veF3_F1_1~_00Izz00bZa zfxAOsCSkGK*RSWF7mXS3qv@Qg7mBymiaGDabvKywzPzuqc5|0dD*`NaIkt>kNT%gt z1%T`4&7;0RHir5F<+J;X_m}tY&vLp>Av?#nmhuG-9zLOex9{v_)EBrr{u$v_KmY;| zfB*y_009U<00Izz00jPLfr`3=ww`zQz4^yKAF^=)-u4PdztA860SG_<0uX=z1Rwwb z2tWV=5V#!zle{%-pRTtzM!kwpa48U`&h+ zDT$O3fbLdB-N9GS4@uF!2cBT{1$f&oS#QvJEa|0-Z(#792dCC*{&|L9mmUs00bZa0SG_<0uX=z1Rwwb2tZ&d zfd;d^v6L@hVx3F%1uhH^y?sf0{e|K@f_0n?l>nEr#N!Zv00bZa0SG_<0uX=z1R$`o z1g7`%t2y@ud+UZ7KGNh8Tpdoq;}m>E=;#tXU7|OgQpROxOo=86DNUP9=G26m&a07( z98D;?=ySD;9o}}aed{Bl+w-VM{tFQ*g=qKr1aGISO%S>Sfs_R#MnvKyl|ji~`gE$I zZ{Nxq(X!EPjVIx?2nPhmlTSNn7e^PV=(L46O5NB)tm8BEtz*{{n9mpB zj(+?5xuZY-RvZ^VzQD>lw6Ql3fB*y_009U<00Izz00bZa0Ykvbo0}Vx>2ZxNRpbl& zmHT|JeCel?Y+S&!b|cLfpf_j`fB*y_009U<00Izz00baV;{wzBO}FDCbdlE6yYnBR z*L1$XTfe63K3ezX$HjbsE1d00jUW2heF#7R0uX=z1Rwwb2tWV=5P-mn6KJ660z69> GF#QYE7%TPw diff --git a/tests/test_admin_seed.py b/tests/web/test_admin_seed.py similarity index 100% rename from tests/test_admin_seed.py rename to tests/web/test_admin_seed.py diff --git a/tests/test_api_attackers.py b/tests/web/test_api_attackers.py similarity index 100% rename from tests/test_api_attackers.py rename to tests/web/test_api_attackers.py diff --git a/tests/test_auth_async.py b/tests/web/test_auth_async.py similarity index 100% rename from tests/test_auth_async.py rename to tests/web/test_auth_async.py diff --git a/tests/test_env_lazy_jwt.py b/tests/web/test_env_lazy_jwt.py similarity index 96% rename from tests/test_env_lazy_jwt.py rename to tests/web/test_env_lazy_jwt.py index 55179041..04833a20 100644 --- a/tests/test_env_lazy_jwt.py +++ b/tests/web/test_env_lazy_jwt.py @@ -41,7 +41,7 @@ def test_agent_cli_imports_without_jwt_secret(monkeypatch, tmp_path): } clean_env["PATH"] = os.environ["PATH"] clean_env["HOME"] = str(tmp_path) - repo = pathlib.Path(__file__).resolve().parent.parent + repo = pathlib.Path(__file__).resolve().parent.parent.parent # binary = repo / ".venv" / "bin" / "decnet" binary = Path(sys.executable).parent / "decnet" result = subprocess.run( diff --git a/tests/test_health_config_cache.py b/tests/web/test_health_config_cache.py similarity index 100% rename from tests/test_health_config_cache.py rename to tests/web/test_health_config_cache.py diff --git a/tests/test_ingester.py b/tests/web/test_ingester.py similarity index 100% rename from tests/test_ingester.py rename to tests/web/test_ingester.py diff --git a/tests/test_router_cache.py b/tests/web/test_router_cache.py similarity index 100% rename from tests/test_router_cache.py rename to tests/web/test_router_cache.py diff --git a/tests/test_web_api.py b/tests/web/test_web_api.py similarity index 100% rename from tests/test_web_api.py rename to tests/web/test_web_api.py