docs(historian)+infra: shared QuestDB fixture, correct SQL test credential, DurationGood/Bad + #821 docs (#822, #820, #821)
#822: HISTORIAN_SQL_TEST_CONNECTION example now targets the shared host 10.100.0.35,14330 with its committed dev sa password (OtOpcUaDev_2026!); the docker-dev rig's own localhost,14330 password (OtOpcUa!Dev123) is called out as a different instance. New labelled (project: lmxopcua) QuestDB fixture stack tests/.../Historian.QuestDb.IntegrationTests/Docker/docker-compose.yml (questdb/questdb:10.0.1, PG wire :8812, console :19000), deployed to /opt/otopcua-questdb on the Docker host; documented in infra/README.md §2a, docs/Historian.md, CLAUDE.md endpoints and the historian rules. Also corrects infra/README's stale "only MQTT/NAT carry the label" note. Docs for #820 (nineteen served aggregates, DurationGood/DurationBad in ms, Gateway still refuses) and the #821 facts (Part 13 vs frozen live vs stock SDK 2.0.1, both directions; decision open with #809). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+27
-1
@@ -37,6 +37,7 @@ ssh dohertj2@10.100.0.35 'docker ps --filter label=project=lmxopcua --format "{{
|
||||
| Stack dir | Purpose |
|
||||
|---|---|
|
||||
| `/opt/otopcua-mssql` | central SQL (always-on) |
|
||||
| `/opt/otopcua-questdb` | QuestDB historian-backend test fixture (always-on, #822) — see §2a |
|
||||
| `/opt/otopcua-modbus` · `/opt/otopcua-abcip` · `/opt/otopcua-s7` · `/opt/otopcua-opcuaclient` · `/opt/otopcua-opcuaclient-nat` · `/opt/otopcua-mqtt` · `/opt/otopcua-mtconnect` · `/opt/otopcua-focas` | driver fixtures |
|
||||
| `~/otopcua-ablegacy` | driver fixture (user-owned) |
|
||||
| `~/otopcua-harness` | Host.IntegrationTests real-mode deps (SQL + GLAuth) — see §4 |
|
||||
@@ -55,6 +56,30 @@ ssh dohertj2@10.100.0.35 'docker ps --filter label=project=lmxopcua --format "{{
|
||||
|
||||
Nuclear reset: `ssh dohertj2@10.100.0.35 'cd /opt/otopcua-mssql && docker compose down -v && docker compose up -d'`.
|
||||
|
||||
## 2a. QuestDB historian fixture (always-on, #822)
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Container | `otopcua-questdb` (`questdb/questdb:10.0.1`, label `project=lmxopcua`), stack `/opt/otopcua-questdb` |
|
||||
| Source of truth | `tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.QuestDb.IntegrationTests/Docker/docker-compose.yml` |
|
||||
| Endpoint | PG wire `10.100.0.35:8812` · web console `http://10.100.0.35:19000` (host `:9000` is taken) |
|
||||
| Creds (dev) | QuestDB stock default `admin` / `quest` (throwaway fixture credential) |
|
||||
| Env var | `HISTORIAN_QUESTDB_TEST_CONNECTION='Host=10.100.0.35;Port=8812;Username=admin;Password=quest;Database=qdb;ServerCompatibilityMode=NoTypeLoading'` |
|
||||
| Used by | `Driver.Historian.QuestDb.IntegrationTests` (incl. the shared `Historian.Conformance` suite); absent env var ⇒ every test skips |
|
||||
|
||||
Deploy / update (the `/opt` dir was created with `sudo mkdir` + `chown dohertj2`):
|
||||
|
||||
```bash
|
||||
rsync -av tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.QuestDb.IntegrationTests/Docker/ \
|
||||
dohertj2@10.100.0.35:/opt/otopcua-questdb/
|
||||
ssh dohertj2@10.100.0.35 'cd /opt/otopcua-questdb && docker compose up -d'
|
||||
```
|
||||
|
||||
Tests isolate by a unique table prefix per class and drop their tables on dispose, so the instance is safe to share.
|
||||
Nuclear reset: `ssh dohertj2@10.100.0.35 'cd /opt/otopcua-questdb && docker compose down -v && docker compose up -d'`.
|
||||
The SQL Server historian suite uses §2's instance: `HISTORIAN_SQL_TEST_CONNECTION='Server=10.100.0.35,14330;User Id=sa;Password=OtOpcUaDev_2026!;TrustServerCertificate=True;Encrypt=False'`
|
||||
(each run creates and drops its own `OtOpcUaHistorian_T_<guid>` database).
|
||||
|
||||
## 3. Driver integration fixtures
|
||||
|
||||
Each driver's integration suite TCP-probes its fixture at collection init and **skips cleanly**
|
||||
@@ -77,6 +102,7 @@ when it isn't running. Bring one up, `dotnet test`, tear down. Repo compose live
|
||||
**Endpoint overrides** point a suite at a real PLC instead of the sim:
|
||||
`MODBUS_SIM_ENDPOINT` · `AB_SERVER_ENDPOINT` · `S7_SIM_ENDPOINT` · `OPCUA_SIM_ENDPOINT` · `OPCUA_NAT_ENDPOINT` (opt-in, no default) ·
|
||||
`MQTT_FIXTURE_ENDPOINT` / `MQTT_FIXTURE_PLAIN_ENDPOINT` · `MTCONNECT_AGENT_ENDPOINT` · `OTOPCUA_FOCAS_SIM_ENDPOINT`.
|
||||
The historian backends are gated on full connection strings instead (`HISTORIAN_SQL_TEST_CONNECTION` · `HISTORIAN_QUESTDB_TEST_CONNECTION`, §2a).
|
||||
|
||||
> **`otopcua-focas-sim` on the host is NOT ours (#651).** It is ignitionoee's mock (created by that
|
||||
> project's `provision-oee-focas.sh` for `ignition-site`; no published port, different defaults:
|
||||
@@ -92,7 +118,7 @@ when it isn't running. Bring one up, `dotnet test`, tear down. Repo compose live
|
||||
> CA + server cert/key, gitignored) and `MQTT_FIXTURE_USERNAME`/`MQTT_FIXTURE_PASSWORD` are exported
|
||||
> at `docker compose up`. The live suite additionally wants `MQTT_FIXTURE_CA_CERT` pointing at a local
|
||||
> copy of the CA: `scp dohertj2@10.100.0.35:/opt/otopcua-mqtt/secrets/ca.crt /tmp/mqtt-fixture-ca.crt`.
|
||||
> It and the OpcUaClient NAT fixture are the only ones whose compose files carry the `project: lmxopcua` label (see CLAUDE.md).
|
||||
> Not every fixture's compose file carries the `project: lmxopcua` label yet (MQTT, Modbus, FOCAS, MTConnect, Sql, the OpcUaClient NAT stack and the QuestDB historian fixture §2a do); enumerate by container name when in doubt.
|
||||
|
||||
> **The OpcUaClient NAT fixture exists for what it ADVERTISES (#806/#813).** `--ph` sets a private `.invalid`
|
||||
> host (RFC 6761: never resolves, so no DNS search domain can make it reachable) and the published port 50010 differs
|
||||
|
||||
Reference in New Issue
Block a user