28 lines
853 B
Python
28 lines
853 B
Python
# Copyright (c) 2026 Umber
|
|
#
|
|
# Licensed under the Apache License, Version 2.0; see LICENSE.
|
|
|
|
"""Live inventory check vs ``configs/default.ini`` (opt-in via env)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
INI = Path(__file__).resolve().parents[1] / "configs" / "default.ini"
|
|
|
|
|
|
@pytest.mark.skipif(
|
|
os.environ.get("FIWI_VERIFY_POWER_INI", "").lower() not in ("1", "true", "yes"),
|
|
reason="Set FIWI_VERIFY_POWER_INI=1 to run local+remote discovery vs configs/default.ini (needs hardware + SSH).",
|
|
)
|
|
def test_inventory_matches_ini_live() -> None:
|
|
pytest.importorskip("brainstem")
|
|
pytest.importorskip("serial")
|
|
from fiwicontrol.lab.inventory_verify import verify_inventory_ini_sync
|
|
|
|
errs = verify_inventory_ini_sync(INI, ssh_controlmaster=False)
|
|
assert errs == [], ";\n".join(errs)
|