test(grpc-data): A4 live scenarios part 1 harness — run-owned opc-plc --alm, native alarm + 2 referencing equipment + 3 condition mappings, UNS-only origin principal, no-grant consumer principal; probe condition-records; node-probe alert-transitions; conditions_scenarios.py (A01/A02/A04/A05/A08)

This commit is contained in:
Joseph Doherty
2026-11-25 01:05:53 -05:00
parent 283790a646
commit 304e8b1b7d
6 changed files with 704 additions and 6 deletions
+7 -2
View File
@@ -473,8 +473,9 @@ def require_production_prerequisites(action, available):
ROOT = Path(__file__).resolve().parents[3]
HERE = Path(__file__).resolve().parent
NODES = tuple(f"{pair}-{n}" for pair in ("control", "source", "consumer") for n in (1, 2))
# `questdb` exists only on a `--history-backend questdb` run (compose.history.questdb.yml); listing it is the DNS allowlist.
SERVICES = ("sql", "migrator", "device", "seeder", "questdb", *NODES)
# `questdb` exists only on a `--history-backend questdb` run (compose.history.questdb.yml), `opcplc` only on a `--conditions`
# run (compose.conditions.yml); listing them is the DNS allowlist.
SERVICES = ("sql", "migrator", "device", "seeder", "questdb", "opcplc", *NODES)
HISTORY_BACKENDS = ("sqlserver", "questdb")
@@ -948,6 +949,10 @@ class LocalRig:
"data_key_files": {"source": str(self.folder / "seed" / "source.key")}}
if self.environment.get("GRPC_DATA_HISTORY") == "1":
manifest["credentials"]["data_key_files"]["source_nohistory"] = str(self.folder / "seed" / "source-nohistory.key")
if self.environment.get("GRPC_DATA_CONDITIONS") == "1":
# A4: the UNS-only origin principal (A04) and the CONSUMER CLI principal without a mapping grant (A05).
manifest["credentials"]["data_key_files"]["source_unsonly"] = str(self.folder / "seed" / "source-unsonly.key")
manifest["credentials"]["data_key_files"]["cli_nogrant"] = str(self.folder / "seed" / "cli-nogrant.key")
manifest["state"] = "seeded"
self.capture(manifest)
return manifest