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

Function testCatalog

cmd/root/models_test.go:30–51  ·  view source on GitHub ↗

testCatalog is a tiny in-memory models.dev database used by the models-list tests so they never fetch the real catalog over the network or read the developer's on-disk cache.

()

Source from the content-addressed store, hash-verified

28// tests so they never fetch the real catalog over the network or read the
29// developer's on-disk cache.
30func testCatalog() *modelsdev.Database {
31 return &modelsdev.Database{
32 Providers: map[string]modelsdev.Provider{
33 "anthropic": {Models: map[string]modelsdev.Model{
34 "claude-sonnet-4-6": {
35 Name: "Claude Sonnet 4.6",
36 Modalities: modelsdev.Modalities{Output: []string{"text"}},
37 },
38 catalogOnlyModel: {
39 Name: "Claude Catalog Only",
40 Modalities: modelsdev.Modalities{Output: []string{"text"}},
41 },
42 }},
43 "openai": {Models: map[string]modelsdev.Model{
44 "gpt-5": {
45 Name: "GPT-5",
46 Modalities: modelsdev.Modalities{Output: []string{"text"}},
47 },
48 }},
49 },
50 }
51}
52
53// withTestConfig injects a hermetic env provider and an in-memory models.dev
54// store into the models command. It keeps listing side-effect-free: without it

Callers 1

withTestConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected