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

Function TestA2AServer_MultiAgent

e2e/a2a_test.go:115–130  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

113}
114
115func 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.
133func sendA2AMessage(t *testing.T, url, requestID, messageID, text string) a2aResponse {

Callers

nothing calls this directly

Calls 4

startRecordingAIProxyFunction · 0.85
startA2AServerFunction · 0.85
sendA2AMessageFunction · 0.85
textPartsMethod · 0.80

Tested by

no test coverage detected