MCPcopy Create free account
hub / github.com/goadesign/goa / TestClientStreaming

Function TestClientStreaming

http/codegen/streaming_test.go:214–395  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

212}
213
214func TestClientStreaming(t *testing.T) {
215 cases := []*testCase{
216 {"client-mixed-endpoints", testdata.StreamingResultDSL, []*sectionExpectation{
217 {"client-websocket-conn-configurer-struct", &testdata.MixedEndpointsConnConfigurerStructCode},
218 {"client-websocket-conn-configurer-struct-init", &testdata.MixedEndpointsConnConfigurerInitCode},
219 }},
220
221 // streaming result
222 {"client-streaming-result", testdata.StreamingResultDSL, []*sectionExpectation{
223 {"client-endpoint-init", &testdata.StreamingResultClientEndpointCode},
224 {"client-websocket-recv", &testdata.StreamingResultClientStreamRecvCode},
225 {"client-websocket-close", nil},
226 {"client-websocket-set-view", nil},
227 }},
228 {"client-streaming-result-with-views", testdata.StreamingResultWithViewsDSL, []*sectionExpectation{
229 {"client-endpoint-init", &testdata.StreamingResultWithViewsClientEndpointCode},
230 {"client-websocket-recv", &testdata.StreamingResultWithViewsClientStreamRecvCode},
231 {"client-websocket-close", nil},
232 {"client-websocket-set-view", &testdata.StreamingResultWithViewsClientStreamSetViewCode},
233 }},
234 {"client-streaming-result-with-explicit-view", testdata.StreamingResultWithExplicitViewDSL, []*sectionExpectation{
235 {"client-endpoint-init", &testdata.StreamingResultWithExplicitViewClientEndpointCode},
236 {"client-websocket-recv", &testdata.StreamingResultWithExplicitViewClientStreamRecvCode},
237 {"client-websocket-set-view", nil},
238 }},
239 {"client-streaming-result-collection-with-views", testdata.StreamingResultCollectionWithViewsDSL, []*sectionExpectation{
240 {"client-websocket-recv", &testdata.StreamingResultCollectionWithViewsClientStreamRecvCode},
241 {"client-websocket-set-view", &testdata.StreamingResultCollectionWithViewsClientStreamSetViewCode},
242 }},
243 {"client-streaming-result-collection-with-explicit-view", testdata.StreamingResultCollectionWithExplicitViewDSL, []*sectionExpectation{
244 {"client-endpoint-init", &testdata.StreamingResultCollectionWithExplicitViewClientEndpointCode},
245 {"client-websocket-recv", &testdata.StreamingResultCollectionWithExplicitViewClientStreamRecvCode},
246 {"client-websocket-set-view", nil},
247 }},
248 {"client-streaming-result-primitive", testdata.StreamingResultPrimitiveDSL, []*sectionExpectation{
249 {"client-websocket-recv", &testdata.StreamingResultPrimitiveClientStreamRecvCode},
250 {"client-websocket-set-view", nil},
251 }},
252 {"client-streaming-result-primitive-array", testdata.StreamingResultPrimitiveArrayDSL, []*sectionExpectation{
253 {"client-websocket-recv", &testdata.StreamingResultPrimitiveArrayClientStreamRecvCode},
254 }},
255 {"client-streaming-result-primitive-map", testdata.StreamingResultPrimitiveMapDSL, []*sectionExpectation{
256 {"client-websocket-recv", &testdata.StreamingResultPrimitiveMapClientStreamRecvCode},
257 }},
258 {"client-streaming-result-user-type-array", testdata.StreamingResultUserTypeArrayDSL, []*sectionExpectation{
259 {"client-websocket-recv", &testdata.StreamingResultUserTypeArrayClientStreamRecvCode},
260 }},
261 {"client-streaming-result-user-type-map", testdata.StreamingResultUserTypeMapDSL, []*sectionExpectation{
262 {"client-websocket-recv", &testdata.StreamingResultUserTypeMapClientStreamRecvCode},
263 }},
264 {"client-streaming-result-no-payload", testdata.StreamingResultNoPayloadDSL, []*sectionExpectation{
265 {"client-endpoint-init", &testdata.StreamingResultNoPayloadClientEndpointCode},
266 }},
267
268 // streaming payload
269
270 {"client-streaming-payload", testdata.StreamingPayloadDSL, []*sectionExpectation{
271 {"client-endpoint-init", &testdata.StreamingPayloadClientEndpointCode},

Callers

nothing calls this directly

Calls 3

CreateHTTPServicesFunction · 0.85
runTestsFunction · 0.85
ClientFilesFunction · 0.70

Tested by

no test coverage detected