MCPcopy
hub / github.com/google/ax / TestHandleSubagentCall_MissingArgs

Function TestHandleSubagentCall_MissingArgs

internal/gemini/gemini_planner_test.go:339–353  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

337}
338
339func TestHandleSubagentCall_MissingArgs(t *testing.T) {
340 p := &geminiPlannerAgent{}
341 fc := &genai.FunctionCall{
342 Name: "test-subagent",
343 Args: map[string]any{},
344 }
345
346 err := p.handleSubagentCall(context.Background(), "test-conv", fc, nil, nil, nil, nil)
347 if err == nil {
348 t.Fatal("expected error due to missing arguments")
349 }
350 if !strings.Contains(err.Error(), "missing or invalid 'prompt' argument") {
351 t.Errorf("unexpected error: %v", err)
352 }
353}
354
355func TestHandleSubagentCall_Failure(t *testing.T) {
356 mockExec := &mockExecutor{

Callers

nothing calls this directly

Calls 1

handleSubagentCallMethod · 0.95

Tested by

no test coverage detected