Exercise the alarm subcommands in the client e2e matrix
Add an opt-in alarm phase (-VerifyAlarms) to run-client-e2e-tests.ps1: each of the five client CLIs runs stream-alarms (asserting at least one AlarmFeedMessage) and acknowledge-alarm against the gateway's central alarm monitor. Both RPCs are session-less. -AlarmReference and -AlarmStreamMax tune the phase; GatewayTesting.md documents it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -293,6 +293,18 @@ path and writes a JSON report under `artifacts/e2e/`:
|
||||
write command is rejected — e.g. against a gateway whose worker predates
|
||||
write support (`MxAccessCommandExecutor` returning `InvalidRequest` for
|
||||
`Write`/`Write2`/`WriteSecured`/`WriteSecured2`).
|
||||
8. **Alarm feed + acknowledge** — *opt-in (`-VerifyAlarms`).* Runs after the
|
||||
stream phase. Exercises the two session-less alarm subcommands against the
|
||||
gateway's central alarm monitor: `stream-alarms` reads a bounded slice of
|
||||
the feed (`-AlarmStreamMax`, default 1 — the feed's first message always
|
||||
arrives immediately, whereas later ones depend on live transitions) and
|
||||
asserts at least one `AlarmFeedMessage`; `acknowledge-alarm` acknowledges
|
||||
`-AlarmReference` (default `Galaxy!TestArea.TestMachine_001.TestAlarm001`)
|
||||
and asserts the RPC round-trips. The native ack outcome is not asserted —
|
||||
it depends on whether that alarm is currently active.
|
||||
|
||||
It is opt-in because it depends on the gateway's central alarm monitor
|
||||
being enabled (`MxGateway:Alarms:Enabled`) and a live alarm provider.
|
||||
|
||||
Each client CLI is driven through one long-lived `batch` process. Every CLI
|
||||
exposes a `batch` subcommand: a process that reads one command line from stdin,
|
||||
@@ -329,6 +341,8 @@ powershell -ExecutionPolicy Bypass -File scripts/run-client-e2e-tests.ps1 -SkipB
|
||||
# Write round-trip (opt-in): point at a writable scalar attribute and its
|
||||
# value type.
|
||||
powershell -ExecutionPolicy Bypass -File scripts/run-client-e2e-tests.ps1 -VerifyWrite -WriteAttribute TestChangingInt -WriteType int32
|
||||
# Alarm feed + acknowledge (opt-in): needs MxGateway:Alarms:Enabled on the gateway.
|
||||
powershell -ExecutionPolicy Bypass -File scripts/run-client-e2e-tests.ps1 -VerifyAlarms -AlarmReference "Galaxy!TestArea.TestMachine_001.TestAlarm001"
|
||||
# Auth rejection: also assert an insufficient-scope key is denied.
|
||||
powershell -ExecutionPolicy Bypass -File scripts/run-client-e2e-tests.ps1 -RejectScopeApiKeyEnv MXGATEWAY_READONLY_API_KEY
|
||||
# Run all five clients concurrently as isolated child processes.
|
||||
|
||||
Reference in New Issue
Block a user