MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / TestApplyAliasAp

Function TestApplyAliasAp

internal/cli/cmd_apply_test.go:65–80  ·  view source on GitHub ↗

`cam ap` alias accepts the same args.

(t *testing.T)

Source from the content-addressed store, hash-verified

63
64// `cam ap` alias accepts the same args.
65func TestApplyAliasAp(t *testing.T) {
66 home := isolatedHome(t)
67 storePath := filepath.Join(t.TempDir(), "store.db")
68 seedProvider(t, storePath, "e", "https://x", "claude", "m", "")
69 stdout, _, code := execute(t, "--store", storePath, "ap", "claude")
70 if code != 0 {
71 t.Fatal("expected zero exit")
72 }
73 if !strings.Contains(stdout, "Applied claude-code") {
74 t.Fatalf("alias ap output unexpected:\n%s", stdout)
75 }
76 // And the file really was written.
77 if _, err := os.Stat(filepath.Join(home, ".claude", "settings.json")); err != nil {
78 t.Errorf("settings.json not written via alias: %v", err)
79 }
80}

Callers

nothing calls this directly

Calls 3

isolatedHomeFunction · 0.85
seedProviderFunction · 0.85
executeFunction · 0.85

Tested by

no test coverage detected