fix: address project audit gaps

This commit is contained in:
2026-07-18 17:42:50 +08:00
parent 1bcdde49d2
commit 79feb20688
10 changed files with 161 additions and 19 deletions

View File

@@ -13,19 +13,12 @@ Expected: all backend tests pass.
## PostgreSQL Integration
Use this test database URL when live PostgreSQL verification is required:
```text
postgres://postgres:Weidong2023~!@8.137.107.29:19432/agent_dev?sslmode=disable
```
Do not hardcode this value into application source files. Pass it through `DATABASE_URL`.
Set `DATABASE_URL` to the live PostgreSQL test database before running integration checks. Do not commit real credentials.
Run:
```powershell
Set-Location backend
$env:DATABASE_URL='postgres://postgres:Weidong2023~!@8.137.107.29:19432/agent_dev?sslmode=disable'
go test -tags integration ./internal/db -run TestPostgresPing -v
```