fix(btw): 无 Postgres 时跳过旁路测试,go.mod 补 uuid 直接依赖
server/side_questions_test.go 的 fixture 在拿不到数据库配置时走 t.Fatal, 导致未设置 ARTEX_PG_DSN 的环境跑 go test ./server 直接失败,掩盖真实回归。 改为 t.Skipf,与 server 包其余测试一致。 db/side_questions.go 直接引用 github.com/google/uuid,go mod tidy 将其 从 indirect 移到 direct。
This commit is contained in:
1 parent
4d7d65a1cf
commit
151bedcdf5
2 files changed
+2
-2
No files matched your search
@@ -5,6 +5,7 @@ go 1.26.3
|
||||
require (
|
||||
github.com/Autumn-27/norma v0.3.7
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/jackc/pgx/v5 v5.10.0
|
||||
github.com/klauspost/compress v1.18.6
|
||||
github.com/lqqyt2423/go-mitmproxy v1.9.2
|
||||
@@ -24,7 +25,6 @@ require (
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/gaissmai/bart v0.26.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gorilla/css v1.0.1 // indirect
|
||||
github.com/gorilla/websocket v1.5.3 // indirect
|
||||
github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 // indirect
|
||||
|
||||
@@ -142,7 +142,7 @@ func newSideHTTPFixture(t *testing.T) *sideHTTPFixture {
|
||||
t.Helper()
|
||||
m, err := NewManager(t.TempDir(), "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
t.Skipf("postgres unavailable (%v) — skipping", err)
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
s := &Server{m: m, engine: NewEngine(m), ctx: ctx, jwtKey: []byte("btw-test-signing-key-only"), chatBusy: map[string]bool{}}
|
||||
|
||||
Reference in new issue
Block a user