- 回收 SQL 占位符改为 $1/$2,消除 pgx 扩展协议 42P18(手动/定时对账 500) - 直接写入 finding 时归一空 confirmation_state,避免 23514 - 修正 R6/overview 同谓词用例夹具,两条台账各自持有 source version - 页面顶部统一服务与队列单行状态条,删除 Embedding/LLM 常量卡 - 平台阶段筛选合并为「WeKnora 处理中」,后端支持 stage=weknora - weknora_url 由测试 WeKnora 源构造,详情与 503 提供跳转链接 - 补 1000/页线上查询、R8 合法收养、weknora 阶段筛选用例
This commit is contained in:
@@ -336,6 +336,26 @@ func TestClientProvidesPaginatedInventoryChunkAndScopedSearchReads(t *testing.T)
|
||||
}
|
||||
}
|
||||
|
||||
// Acceptance #16: the reconciliation scan must be one 1000-per-page read, and
|
||||
// the wire query is the evidence — not just the constant passed to the interface.
|
||||
func TestListKnowledgeSendsScanPageSizeOnTheWire(t *testing.T) {
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Query().Get("page") != "1" || r.URL.Query().Get("page_size") != "1000" {
|
||||
t.Fatalf("knowledge list query = %s", r.URL.RawQuery)
|
||||
}
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
_, _ = w.Write([]byte(`{"success":true,"data":[],"total":0,"page":1,"page_size":1000}`))
|
||||
}))
|
||||
defer server.Close()
|
||||
client, err := NewClient(ClientConfig{BaseURL: server.URL, APIKey: "test-api-key", Timeout: time.Second})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, _, err := client.ListKnowledge(context.Background(), "kb-1", 1, 1000); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientRejectsRedirectWithoutForwardingAPIKey(t *testing.T) {
|
||||
var targetHits atomic.Int32
|
||||
target := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user