(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestReplay_UnknownMode(t *testing.T) { |
| 28 | st := requests.NewMemoryStore() |
| 29 | req := types.AIRequest{ |
| 30 | TenantID: "t", |
| 31 | TaskType: "chat", |
| 32 | Priority: "p", |
| 33 | Input: map[string]any{"text": "hi"}, |
| 34 | Options: types.RequestOptions{Stream: false, MaxTokens: 64}, |
| 35 | } |
| 36 | full, _ := json.Marshal(req) |
| 37 | _ = st.CreateRequest(context.Background(), requests.RequestRow{ |
| 38 | RequestID: "rid1", |
| 39 | TenantID: "t", |
| 40 | TaskType: "chat", |
| 41 | Priority: "p", |
| 42 | AIRequestJSON: full, |
| 43 | CreatedAt: time.Now(), |
| 44 | UpdatedAt: time.Now(), |
| 45 | }) |
| 46 | _, err := Replay(context.Background(), &config.Config{}, st, "rid1", Mode("bogus"), Dependencies{}) |
| 47 | if err == nil || !strings.Contains(err.Error(), "unknown replay mode") { |
| 48 | t.Fatalf("err=%v", err) |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | func TestReplayExact_MissingPrimaryBackend(t *testing.T) { |
| 53 | st := requests.NewMemoryStore() |
nothing calls this directly
no test coverage detected