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

Function TestA2AServer_MultipleRequests

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

Source from the content-addressed store, hash-verified

88}
89
90func TestA2AServer_MultipleRequests(t *testing.T) {
91 t.Parallel()
92
93 _, runConfig := startRecordingAIProxy(t)
94 agentCard := startA2AServer(t, "testdata/basic.yaml", runConfig)
95
96 messages := []string{
97 "Say 'hello' in one word.",
98 "Say 'goodbye' in one word.",
99 }
100
101 for i, message := range messages {
102 t.Run(fmt.Sprintf("request_%d", i), func(t *testing.T) {
103 requestID := fmt.Sprintf("test-request-%d", i)
104 msgID := fmt.Sprintf("msg-%d", i)
105
106 resp := sendA2AMessage(t, agentCard.URL, requestID, msgID, message)
107
108 assert.Equal(t, requestID, resp.ID)
109 assert.Nil(t, resp.Error)
110 assert.NotNil(t, resp.Result)
111 })
112 }
113}
114
115func TestA2AServer_MultiAgent(t *testing.T) {
116 t.Parallel()

Callers

nothing calls this directly

Calls 4

startRecordingAIProxyFunction · 0.85
startA2AServerFunction · 0.85
sendA2AMessageFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected