MCPcopy Index your code
hub / github.com/docker/docker-agent / TestRunLLM_RequiresRunAgent

Function TestRunLLM_RequiresRunAgent

pkg/runtime/compactor/compactor_test.go:522–536  ·  view source on GitHub ↗

TestRunLLM_RequiresRunAgent pins the contract that a missing RunAgent callback is rejected loudly rather than silently no-oping.

(t *testing.T)

Source from the content-addressed store, hash-verified

520// TestRunLLM_RequiresRunAgent pins the contract that a missing RunAgent
521// callback is rejected loudly rather than silently no-oping.
522func TestRunLLM_RequiresRunAgent(t *testing.T) {
523 t.Parallel()
524
525 sess := session.New()
526 a := agent.New("test", "test")
527
528 _, err := RunLLM(t.Context(), LLMArgs{
529 Session: sess,
530 Agent: a,
531 ContextLimit: 100_000,
532 // RunAgent intentionally nil
533 })
534 require.Error(t, err)
535 assert.Contains(t, err.Error(), "RunAgent")
536}
537
538// TestRunLLM_RequiresContextLimit pins that the LLM strategy refuses
539// to run without a real context budget — it would otherwise feed an

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
NewFunction · 0.92
RunLLMFunction · 0.85
ContextMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected