From 6098076608a5e8f181b822141622fa72ffbcef3a Mon Sep 17 00:00:00 2001 From: Md Nurnobi Date: Tue, 24 Nov 2026 03:00:24 +0000 Subject: [PATCH] ci(fa02): simplify disposable PostgreSQL fixture SQL for strict restore verification [skip ci] --- .gitea/workflows/datastack-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/datastack-ci.yml b/.gitea/workflows/datastack-ci.yml index 97f0913..cffb7df 100644 --- a/.gitea/workflows/datastack-ci.yml +++ b/.gitea/workflows/datastack-ci.yml @@ -253,13 +253,13 @@ jobs: done echo DATASTACK_DISPOSABLE_FIVE_SERVICE_HEALTH_PASS # Disposable PostgreSQL backup and restore into a second, isolated database. - compose exec -T postgres sh -c 'psql -q -U datastack "$POSTGRES_DB" -v ON_ERROR_STOP=1 -c "CREATE TABLE fa02_disposable_fixture (id integer PRIMARY KEY, message text NOT NULL); INSERT INTO fa02_disposable_fixture VALUES (1, '\''test-only'\'');"' + compose exec -T postgres sh -c 'psql -q -U datastack "$POSTGRES_DB" -v ON_ERROR_STOP=1 -c "CREATE TABLE fa02_disposable_fixture (id integer PRIMARY KEY); INSERT INTO fa02_disposable_fixture VALUES (4242);"' compose exec -T postgres sh -c 'pg_dump -U datastack "$POSTGRES_DB"' > "$testdir/pg.sql" test -s "$testdir/pg.sql" compose exec -T postgres createdb -U datastack fa02_disposable_restore compose exec -T postgres psql -q -v ON_ERROR_STOP=1 -U datastack -d fa02_disposable_restore < "$testdir/pg.sql" - restored="$(compose exec -T postgres psql -At -U datastack -d fa02_disposable_restore -c 'SELECT message FROM fa02_disposable_fixture WHERE id = 1')" - test "$restored" = test-only + restored="$(compose exec -T postgres psql -At -U datastack -d fa02_disposable_restore -c 'SELECT id FROM fa02_disposable_fixture WHERE id = 4242')" + test "$restored" = 4242 echo DATASTACK_DISPOSABLE_POSTGRES_BACKUP_RESTORE_PASS # Redis AOF and CSV storage fixtures: no user/production records. compose exec -T redis redis-cli SET fa02:disposable:probe stable-fixture >/dev/null