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

Function TestAlloyModelNestedComposition

pkg/config/config_test.go:57–70  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func TestAlloyModelNestedComposition(t *testing.T) {
58 t.Parallel()
59
60 cfg, err := Load(t.Context(), NewFileSource("testdata/alloy_model_nested.yaml"))
61 require.NoError(t, err)
62
63 // The nested alloy should be fully expanded to all constituent models
64 assert.Equal(t, "opus,gpt,gemini", cfg.Agents.First().Model)
65
66 // All base models should exist
67 assert.Equal(t, "anthropic", cfg.Models["opus"].Provider)
68 assert.Equal(t, "openai", cfg.Models["gpt"].Provider)
69 assert.Equal(t, "google", cfg.Models["gemini"].Provider)
70}
71
72func TestMigrate_v0_v1_provider(t *testing.T) {
73 t.Parallel()

Callers

nothing calls this directly

Calls 4

NewFileSourceFunction · 0.85
ContextMethod · 0.80
LoadFunction · 0.70
FirstMethod · 0.45

Tested by

no test coverage detected