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

Function TestFetchModelsFromURL_EmptyBody

cmd/root/models_test.go:223–233  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

221}
222
223func TestFetchModelsFromURL_EmptyBody(t *testing.T) {
224 t.Parallel()
225
226 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
227 w.Header().Set("Content-Type", "application/json")
228 }))
229 t.Cleanup(server.Close)
230
231 models := fetchModelsFromURL(t.Context(), server.URL+"/v1/models", server.Client())
232 assert.Empty(t, models)
233}
234
235func TestFetchModelsFromURL_EmptyDataArray(t *testing.T) {
236 t.Parallel()

Callers

nothing calls this directly

Calls 4

fetchModelsFromURLFunction · 0.85
ContextMethod · 0.80
CleanupMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected