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

Function TestSkillInstallAllForce

internal/cli/cmd_skill_test.go:247–262  ·  view source on GitHub ↗

--all with --force overwrites existing.

(t *testing.T)

Source from the content-addressed store, hash-verified

245
246// --all with --force overwrites existing.
247func TestSkillInstallAllForce(t *testing.T) {
248 home := isolatedHome(t)
249 seedEntity(t, entities.KindSkill, "s1", "new-body", "")
250 installEntityToApp(t, home, entities.KindSkill, "s1", "old-body", "claude")
251 stdout, _, code := execute(t, "skill", "install", "--all", "--app", "claude", "--force")
252 if code != 0 {
253 t.Fatalf("exit = %d", code)
254 }
255 if !strings.Contains(stdout, "Installed 1 skill(s)") {
256 t.Fatalf("missing install count:\n%s", stdout)
257 }
258 data, _ := os.ReadFile(filepath.Join(home, ".claude", "skills", "s1", "SKILL.md"))
259 if string(data) != "new-body" {
260 t.Fatalf("expected new-body, got %q", data)
261 }
262}
263
264// Already installed without --force skips.
265func TestSkillInstallSkipsExisting(t *testing.T) {

Callers

nothing calls this directly

Calls 5

isolatedHomeFunction · 0.85
seedEntityFunction · 0.85
installEntityToAppFunction · 0.85
executeFunction · 0.85
ReadFileMethod · 0.80

Tested by

no test coverage detected