fix(server): honor keepHostSettings for SQLite imports into PostgreSQL (#6995)

importPostgresDB forwarded keepHostSettings only for native PostgreSQL dumps; both SQLite branches dropped it, so importing a .db or SQL dump copied the source's ports, paths, certificates and node identity over the destination's. Both formats now capture the host-bound settings first and restore them after a successful migration. CI runs the new integration test against PostgreSQL. Fixes #6993.
This commit is contained in:
Hamed
2026-11-02 17:43:58 +03:30
committed by GitHub
parent 4180899f15
commit d2450e103c
3 changed files with 296 additions and 3 deletions
+9
View File
@@ -191,6 +191,15 @@ jobs:
echo "expected at least 4 passing PostgreSQL migration tests, got $passed" >&2
exit 1
fi
- name: SQLite import host settings
run: |
set -o pipefail
go test ./internal/web/service -run '^TestImportSQLiteIntoPostgresHostSettings$' -count=1 -v | tee /tmp/postgres-import-host-settings.log
passed=$(grep -c -- '^--- PASS: TestImportSQLiteIntoPostgresHostSettings ' /tmp/postgres-import-host-settings.log || true)
if [ "$passed" -ne 1 ]; then
echo "expected the SQLite import integration test to pass, got $passed" >&2
exit 1
fi
codegen:
runs-on: ubuntu-latest