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:
Autumn-27 committed 2026-09-11 11:10:32 -04:00
1 parent 4d7d65a1cf
commit 151bedcdf5
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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{}}