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

Function TestResolveAlias_WithModelOption

pkg/config/resolve_test.go:496–514  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

494}
495
496func TestResolveAlias_WithModelOption(t *testing.T) {
497 home := t.TempDir()
498 t.Setenv("HOME", home)
499
500 // Set up alias with model option
501 cfg, err := userconfig.Load()
502 require.NoError(t, err)
503 require.NoError(t, cfg.SetAlias("model-agent", &userconfig.Alias{
504 Path: "agentcatalog/coder",
505 Model: "openai/gpt-4o-mini",
506 }))
507 require.NoError(t, cfg.Save())
508
509 // Resolve alias options
510 alias := ResolveAlias("model-agent")
511 require.NotNil(t, alias)
512 assert.False(t, alias.Yolo)
513 assert.Equal(t, "openai/gpt-4o-mini", alias.Model)
514}
515
516func TestResolveAlias_WithBothOptions(t *testing.T) {
517 home := t.TempDir()

Callers

nothing calls this directly

Calls 4

LoadFunction · 0.92
ResolveAliasFunction · 0.85
SetAliasMethod · 0.80
SaveMethod · 0.80

Tested by

no test coverage detected