Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Tests follow the Postgres TLS default: doctor goldens gain the postgres_tls check, ci-local pins the sslmode=disable CI URLs
garrytanb8a0823cc674
diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.jsonindex 0959b1e3fe..1af34dc614 100644--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json@@ -1198,6 +1198,13 @@"name": "rls","status": "ok"},+ {+ "category": "ops",+ "elapsed_ms": "<volatile>",+ "message": "The Postgres host is on this machine; TLS is not required.",+ "name": "postgres_tls",+ "status": "ok"+ },{"category": "ops","elapsed_ms": "<volatile>",@@ -6324,6 +6331,13 @@"name": "rls","status": "ok"},+ {+ "category": "ops",+ "elapsed_ms": "<volatile>",+ "message": "The Postgres host is on this machine; TLS is not required.",+ "name": "postgres_tls",+ "status": "ok"+ },{"category": "ops","elapsed_ms": "<volatile>",diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.jsonindex e5f457a573..67b224854d 100644--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json@@ -1087,6 +1087,13 @@"name": "rls","status": "ok"},+ {+ "category": "ops",+ "elapsed_ms": "<volatile>",+ "message": "The Postgres host is on this machine; TLS is not required.",+ "name": "postgres_tls",+ "status": "ok"+ },{"category": "ops","elapsed_ms": "<volatile>",diff --git a/test/scripts/ci-local-rendering.test.ts b/test/scripts/ci-local-rendering.test.tsindex b2ef68c0f8..083feeec67 100644--- a/test/scripts/ci-local-rendering.test.ts+++ b/test/scripts/ci-local-rendering.test.ts@@ -136,9 +136,9 @@ for line in {1..35}; do printf 'fixture progress %s\\n' "$line"; done`);put('scripts/run-e2e.sh', `set -eu-case "$DATABASE_URL" in postgresql://postgres:postgres@postgres-*:5432/gbrain_test) ;; *) exit 42 ;; esac-[ "$GBRAIN_PGBOUNCER_URL" = postgresql://postgres:postgres@pgbouncer:5432/gbrain_pgbouncer_test ] || exit 43-[ "$GBRAIN_PGBOUNCER_DIRECT_URL" = postgresql://postgres:postgres@postgres-1:5432/gbrain_ci_admin_test ] || exit 44+case "$DATABASE_URL" in postgresql://postgres:postgres@postgres-*:5432/gbrain_test?sslmode=disable) ;; *) exit 42 ;; esac+[ "$GBRAIN_PGBOUNCER_URL" = 'postgresql://postgres:postgres@pgbouncer:5432/gbrain_pgbouncer_test?sslmode=disable' ] || exit 43+[ "$GBRAIN_PGBOUNCER_DIRECT_URL" = 'postgresql://postgres:postgres@postgres-1:5432/gbrain_ci_admin_test?sslmode=disable' ] || exit 44[ "$GBRAIN_CI_REQUIRE_PGBOUNCER" = 1 ] || exit 45[ "$GBRAIN_TEST_DB" = 1 ] || exit 46printf 'target:%s\\n' "db=$DATABASE_URL" "pgbouncer=$GBRAIN_PGBOUNCER_URL" "direct=$GBRAIN_PGBOUNCER_DIRECT_URL" >> "$TRACE"@@ -208,7 +208,7 @@ describe('ci-local execution coverage', () => {const admins = new Set(role('direct').map(url => `${url.host}${url.pathname}`));expect([...admins]).toEqual(['postgres-1:5432/gbrain_ci_admin_test']);for (const shard of shards) expect(shard.pathname).not.toBe('/gbrain_ci_admin_test');- const created = result.trace.indexOf('admin_db:postgresql://postgres:postgres@postgres-1:5432/gbrain_test:gbrain_ci_admin_test');+ const created = result.trace.indexOf('admin_db:postgresql://postgres:postgres@postgres-1:5432/gbrain_test?sslmode=disable:gbrain_ci_admin_test');expect(created).toBeGreaterThanOrEqual(0);expect(created).toBeLessThan(result.trace.findIndex(line => line.startsWith('e2e:')));});