Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ci/journey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,11 @@ iceberg: { warehouse: "${WAREHOUSE}", lakekeeper_endpoint: "http://${LK_IP}:818
$(storage_yaml)
EOF
cat /tmp/journey-export.yaml >>/tmp/journey-roundtrip.yaml
# Snapshot the serialized config values before deletion; the round-trip must
# restore them exactly, not merely recreate the row (value fidelity, not just
# a row-count check).
local cfg_sig_before
cfg_sig_before=$(q "$HOST" "SELECT partition_period::text||'|'||coalesce(hot_period::text,'NULL')||'|'||coalesce(retention_period::text,'NULL')||'|'||enabled::text FROM coldfront.partition_config WHERE schema_name='public' AND table_name='cli_events';")
q "$HOST" "DELETE FROM coldfront.partition_config WHERE schema_name='public' AND table_name='cli_events';" >/dev/null
assert_eq "TC-119: cli_events deleted from partition_config" "0" \
"$(q "$HOST" "SELECT count(*) FROM coldfront.partition_config WHERE table_name='cli_events';")"
Expand All @@ -2086,6 +2091,10 @@ EOF
fi
assert_eq "TC-119: cli_events row restored in partition_config" "1" \
"$(q "$HOST" "SELECT count(*) FROM coldfront.partition_config WHERE table_name='cli_events';")"
local cfg_sig_after
cfg_sig_after=$(q "$HOST" "SELECT partition_period::text||'|'||coalesce(hot_period::text,'NULL')||'|'||coalesce(retention_period::text,'NULL')||'|'||enabled::text FROM coldfront.partition_config WHERE schema_name='public' AND table_name='cli_events';")
assert_eq "TC-119: restored values match pre-deletion snapshot (period|hot|retention|enabled)" \
"$cfg_sig_before" "$cfg_sig_after"

# TC-120: set writes to partition_config only — the YAML config file is never
# touched. Capture a checksum before, run set, then verify both the DB
Expand Down