mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-03 03:35:04 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user