(t *testing.T)
| 113 | } |
| 114 | |
| 115 | func TestA2AServer_MultiAgent(t *testing.T) { |
| 116 | t.Parallel() |
| 117 | |
| 118 | _, runConfig := startRecordingAIProxy(t) |
| 119 | agentCard := startA2AServer(t, "testdata/multi.yaml", runConfig) |
| 120 | |
| 121 | resp := sendA2AMessage(t, agentCard.URL, "test-multi-1", "msg-multi-1", "Say hello.") |
| 122 | |
| 123 | assert.Equal(t, "test-multi-1", resp.ID) |
| 124 | assert.Nil(t, resp.Error) |
| 125 | require.NotNil(t, resp.Result) |
| 126 | |
| 127 | texts := resp.textParts() |
| 128 | require.NotEmpty(t, texts) |
| 129 | assert.Contains(t, texts[len(texts)-1], "Hello") |
| 130 | } |
| 131 | |
| 132 | // sendA2AMessage sends a message/send JSON-RPC request and returns the parsed response. |
| 133 | func sendA2AMessage(t *testing.T, url, requestID, messageID, text string) a2aResponse { |
nothing calls this directly
no test coverage detected