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

Function TestFetchModelsFromURL_Status500

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

Source from the content-addressed store, hash-verified

195}
196
197func TestFetchModelsFromURL_Status500(t *testing.T) {
198 t.Parallel()
199
200 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
201 w.WriteHeader(http.StatusInternalServerError)
202 }))
203 t.Cleanup(server.Close)
204
205 models := fetchModelsFromURL(t.Context(), server.URL+"/v1/models", server.Client())
206 assert.Empty(t, models)
207}
208
209func TestFetchModelsFromURL_MalformedJSON(t *testing.T) {
210 t.Parallel()

Callers

nothing calls this directly

Calls 3

fetchModelsFromURLFunction · 0.85
ContextMethod · 0.80
CleanupMethod · 0.65

Tested by

no test coverage detected