mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-01 06:54:47 +03:00
test(node): cover counter resets on PostgreSQL (#7272)
The three regressions for a node counter that restarts below its baseline, and the migration test for the column that fix added, shared fixed node ids and inbound tags. Run as a group against PostgreSQL, the database in the report, the second one failed on a duplicate key before reaching the code under test.
Give each case its own PostgreSQL schema and run all four in the PostgreSQL CI job, requiring four passes. No panel code changes; the fix itself is already on main in 408fd682.
Refs #7271
This commit is contained in:
@@ -204,6 +204,16 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL node counter reset regressions
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test -p 1 ./internal/web/service ./internal/database -run '^(TestNodeFrozenDip_|TestMigrateNodeClientTrafficDippedWhileFrozenColumn$)' -count=1 -v | tee /tmp/postgres-node-counter-reset.log
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-node-counter-reset.log || true)
|
||||
if [ "$passed" -ne 4 ]; then
|
||||
echo "expected 3 node counter regressions and 1 migration test to pass, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL schema and migration tests
|
||||
run: |
|
||||
set -o pipefail
|
||||
|
||||
Reference in New Issue
Block a user