diff --git a/tests/test_telemetry_exporter.py b/tests/telemetry/test_telemetry_exporter.py similarity index 99% rename from tests/test_telemetry_exporter.py rename to tests/telemetry/test_telemetry_exporter.py index ec66b2dc..7bdbbb25 100644 --- a/tests/test_telemetry_exporter.py +++ b/tests/telemetry/test_telemetry_exporter.py @@ -39,7 +39,8 @@ REQUIRED_DIMS = {"host.name", "node", "server.address", "bmc.ip", "vendor"} TEST_SERVICE_INSTANCE_ID = "cb0377f1-e3b9-4da9-9275-71825b2c6434" GB300_CORPUS = corpus_dir( - Path(__file__).parent / "supermicro_gb300_corpus.tar.gz", "172.25.230.37" + Path(__file__).parent.parent / "supermicro_gb300_corpus.tar.gz", + "172.25.230.37", ) GB300_INDEX = {path.name.lower(): path for path in GB300_CORPUS.glob("*.json")} @@ -684,7 +685,7 @@ def test_scrape_health_signals_contract(): """ import yaml spec = yaml.safe_load( - (Path(__file__).parent.parent / "specs/telemetry/expected_signals.yaml") + (Path(__file__).parents[2] / "specs/telemetry/expected_signals.yaml") .read_text(encoding="utf-8")) dims = build_identity_dimensions("172.25.230.29", vendor="supermicro") for row in spec.get("scrape_health_signals", []): @@ -969,7 +970,7 @@ def test_metric_catalog_yaml_matches_runtime_static_catalog(): """The checked-in catalog spec mirrors the runtime static definitions.""" import yaml spec = yaml.safe_load( - (Path(__file__).parent.parent / "specs/telemetry/catalog.yaml") + (Path(__file__).parents[2] / "specs/telemetry/catalog.yaml") .read_text(encoding="utf-8")) runtime = metric_definitions() rows = {row["name"]: row for row in spec["metrics"]} @@ -1731,7 +1732,7 @@ def test_expected_signals_contract(): """ import yaml spec = yaml.safe_load( - (Path(__file__).parent.parent / "specs/telemetry/expected_signals.yaml") + (Path(__file__).parents[2] / "specs/telemetry/expected_signals.yaml") .read_text(encoding="utf-8")) missing = [] for row in spec["signals"]: @@ -1749,7 +1750,7 @@ def test_state_allowlists_match_contract_spec(): """Code allowlists equal the spec allowlists (G0 documentation truth).""" import yaml spec = yaml.safe_load( - (Path(__file__).parent.parent / "specs/telemetry/expected_signals.yaml") + (Path(__file__).parents[2] / "specs/telemetry/expected_signals.yaml") .read_text(encoding="utf-8")) allow = spec["allowlists"] assert set(allow["health"]) == exporter_mod.HEALTH_LABELS | {"unknown"} diff --git a/tests/test_telemetry_service_identity.py b/tests/telemetry/test_telemetry_service_identity.py similarity index 99% rename from tests/test_telemetry_service_identity.py rename to tests/telemetry/test_telemetry_service_identity.py index 6097da4c..c819be9c 100644 --- a/tests/test_telemetry_service_identity.py +++ b/tests/telemetry/test_telemetry_service_identity.py @@ -22,7 +22,7 @@ to_signalfx_body, ) -REPO_ROOT = Path(__file__).resolve().parents[1] +REPO_ROOT = Path(__file__).resolve().parents[2] CORPUS_MANAGERS = ( ( diff --git a/tests/test_telemetry_submit_test_dualmode.py b/tests/telemetry/test_telemetry_submit_test_dualmode.py similarity index 98% rename from tests/test_telemetry_submit_test_dualmode.py rename to tests/telemetry/test_telemetry_submit_test_dualmode.py index be3ff029..853a0021 100644 --- a/tests/test_telemetry_submit_test_dualmode.py +++ b/tests/telemetry/test_telemetry_submit_test_dualmode.py @@ -11,7 +11,7 @@ from redfish_ctl.redfish_manager import CommandResult DELL_XR8620T_CORPUS = corpus_dir( - Path(__file__).parent / "dell_xr8620t_corpus.tar.gz", "10.252.252.209" + Path(__file__).parent.parent / "dell_xr8620t_corpus.tar.gz", "10.252.252.209" ) DELL_XR8620T_INDEX = { path.name.lower(): path for path in DELL_XR8620T_CORPUS.glob("*.json") diff --git a/tests/test_capability_report.py b/tests/vendors/test_capability_report.py similarity index 98% rename from tests/test_capability_report.py rename to tests/vendors/test_capability_report.py index 84851999..8177ce0b 100644 --- a/tests/test_capability_report.py +++ b/tests/vendors/test_capability_report.py @@ -10,7 +10,7 @@ from redfish_ctl.redfish_manager import CommandResult from redfish_ctl.vendors import capability_report, get_vendor -REPO_ROOT = Path(__file__).resolve().parent.parent +REPO_ROOT = Path(__file__).resolve().parents[2] def test_vendor_capabilities_to_dict_is_json_ready(): diff --git a/tests/test_conformance.py b/tests/vendors/test_conformance.py similarity index 97% rename from tests/test_conformance.py rename to tests/vendors/test_conformance.py index b57dec64..cda6a2cf 100644 --- a/tests/test_conformance.py +++ b/tests/vendors/test_conformance.py @@ -6,7 +6,7 @@ from redfish_ctl.vendors import get_vendor -TESTS_ROOT = Path(__file__).resolve().parent +TESTS_ROOT = Path(__file__).resolve().parent.parent FIXTURE_ROOTS = { "dell": TESTS_ROOT / "idrac_fixtures", "hpe": TESTS_ROOT / "hpe_fixtures", diff --git a/tests/test_vendor_evidence.py b/tests/vendors/test_vendor_evidence.py similarity index 97% rename from tests/test_vendor_evidence.py rename to tests/vendors/test_vendor_evidence.py index 0f56ec0a..aee17b82 100644 --- a/tests/test_vendor_evidence.py +++ b/tests/vendors/test_vendor_evidence.py @@ -9,7 +9,7 @@ from redfish_ctl.vendors import get_vendor from redfish_ctl.vendors.base import VendorCapabilities -REPO_ROOT = Path(__file__).resolve().parents[1] +REPO_ROOT = Path(__file__).resolve().parents[2] def _evidence_path(note: str) -> Path: diff --git a/tests/test_webui_explorer.py b/tests/webui/test_webui_explorer.py similarity index 98% rename from tests/test_webui_explorer.py rename to tests/webui/test_webui_explorer.py index 5debf254..74e84105 100644 --- a/tests/test_webui_explorer.py +++ b/tests/webui/test_webui_explorer.py @@ -23,7 +23,8 @@ from redfish_ctl.webui import catalog, server GB300_CORPUS = corpus_dir( - Path(__file__).parent / "supermicro_gb300_corpus.tar.gz", "172.25.230.37" + Path(__file__).parent.parent / "supermicro_gb300_corpus.tar.gz", + "172.25.230.37", ) GB300_INDEX = {p.name.lower(): p for p in GB300_CORPUS.glob("*.json")} diff --git a/tools/test_layout_baseline.txt b/tools/test_layout_baseline.txt index ffe4e4d6..86b3f539 100644 --- a/tools/test_layout_baseline.txt +++ b/tools/test_layout_baseline.txt @@ -8,13 +8,11 @@ tests/test_api_facade.py tests/test_ast_conventions.py tests/test_base_request_respond_async.py tests/test_boot_options_dualmode.py -tests/test_capability_report.py tests/test_cli_subcommand_uniqueness.py tests/test_cmd_utils.py tests/test_cmd_utils_save.py tests/test_command_import_regressions.py tests/test_concurrency_benchmark.py -tests/test_conformance.py tests/test_crawl_bmc_safety.py tests/test_dell_vendor_corpus.py tests/test_discover_ids.py @@ -59,16 +57,11 @@ tests/test_ssl_verify.py tests/test_supermicro_gb300_corpus.py tests/test_supermicro_x10_fixtures.py tests/test_supermicro_x10_vendor_corpus.py -tests/test_telemetry_exporter.py -tests/test_telemetry_service_identity.py -tests/test_telemetry_submit_test_dualmode.py tests/test_utils.py -tests/test_vendor_evidence.py tests/test_vendor_portability.py tests/test_version_consistency.py tests/test_wait.py tests/test_wait_dualmode.py -tests/test_webui_explorer.py tests/test_write_status_enum_checks.py tests/test_yaml_output.py tests/vendor_corpus.py