From af14f1c9097254ac7afd8ced46fd70a86caa90f2 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 21 Sep 2026 13:18:23 +0200 Subject: [PATCH] The model-usage bed can be left standing, and its account names the filters --- test/integration/assigned-model-usage.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/assigned-model-usage.test.ts b/test/integration/assigned-model-usage.test.ts index daed8e0..eb3966e 100644 --- a/test/integration/assigned-model-usage.test.ts +++ b/test/integration/assigned-model-usage.test.ts @@ -177,6 +177,10 @@ before(async () => { }, { timeout: 1_800_000 }); after(async () => { + if (process.env["MESH_LAB_KEEP"]) { + console.log(`\nLEFT STANDING: ${instanceId} — not destroyed (MESH_LAB_KEEP).`); + return; + } if (instanceId) await destroy(instanceId); await destroyAll(`${SCENARIO}-`); }, { timeout: 600_000 }); @@ -312,6 +316,11 @@ test("usage events are upserted into model-usage's store — latest-per-key, bot "--- grants:", (await on(NODE, `ls -la /var/lib/postgres/grants/; cat /var/lib/postgres/grants/mesh.json 2>&1 | head -30`)).out, "--- roles:", (await on(NODE, `docker exec postgres psql -U postgres -tAc "select rolname from pg_roles where rolname like 'mesh%'" 2>&1`)).out, "--- host log:", (await on(NODE, `tail -40 /var/log/mesh-host.log 2>&1`)).out, + "--- containers:", (await on(NODE, `docker ps -a --format '{{.Names}} {{.Status}}'`)).out, + "--- postgres server:", (await on(NODE, `docker logs --tail 15 postgres 2>&1; ls -la /var/lib/postgres/`)).out, + "--- laptop filter:", (await on(NODE, `nft list ruleset 2>&1 | head -60`)).out, + "--- laptop → broker from a container:", (await on(NODE, `docker run --rm --network postgres alpine sh -c 'nc -zvw3 192.0.2.10 5671' 2>&1`)).out, + "--- anchor filter counters:", (await on("anchor", `nft -a list table inet mesh 2>&1 | head -60`)).out, ].join("\n"); const conn = `postgresql://${bound.as}:${encodeURIComponent(pw)}@postgres:5432/${bound.as}?sslmode=disable`;