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

Function TestResolveAlias_WithBothOptions

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

Source from the content-addressed store, hash-verified

514}
515
516func TestResolveAlias_WithBothOptions(t *testing.T) {
517 home := t.TempDir()
518 t.Setenv("HOME", home)
519
520 // Set up alias with both options
521 cfg, err := userconfig.Load()
522 require.NoError(t, err)
523 require.NoError(t, cfg.SetAlias("turbo", &userconfig.Alias{
524 Path: "agentcatalog/coder",
525 Yolo: true,
526 Model: "anthropic/claude-sonnet-4-0",
527 }))
528 require.NoError(t, cfg.Save())
529
530 // Resolve alias options
531 alias := ResolveAlias("turbo")
532 require.NotNil(t, alias)
533 assert.True(t, alias.Yolo)
534 assert.Equal(t, "anthropic/claude-sonnet-4-0", alias.Model)
535}
536
537func TestResolveAlias_WithSandboxOption(t *testing.T) {
538 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