MCPcopy Create free account
hub / github.com/docker/docker-agent / TestFetchModelsFromURL_Non200

Function TestFetchModelsFromURL_Non200

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

Source from the content-addressed store, hash-verified

183}
184
185func TestFetchModelsFromURL_Non200(t *testing.T) {
186 t.Parallel()
187
188 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
189 w.WriteHeader(http.StatusNotFound)
190 }))
191 t.Cleanup(server.Close)
192
193 models := fetchModelsFromURL(t.Context(), server.URL+"/v1/models", server.Client())
194 assert.Empty(t, models)
195}
196
197func TestFetchModelsFromURL_Status500(t *testing.T) {
198 t.Parallel()

Callers

nothing calls this directly

Calls 3

fetchModelsFromURLFunction · 0.85
ContextMethod · 0.80
CleanupMethod · 0.65

Tested by

no test coverage detected