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

Function TestSkillSearchLocalOnly

internal/cli/cmd_skill_test.go:519–533  ·  view source on GitHub ↗

--local skips GitHub and only searches local store + configured repos.

(t *testing.T)

Source from the content-addressed store, hash-verified

517
518// --local skips GitHub and only searches local store + configured repos.
519func TestSkillSearchLocalOnly(t *testing.T) {
520 isolatedHome(t)
521 seedEntity(t, entities.KindSkill, "my-terraform-skill", "content", "Terraform module builder")
522 stdout, _, code := execute(t, "skill", "search", "terraform", "--local")
523 if code != 0 {
524 t.Fatalf("exit = %d", code)
525 }
526 if !strings.Contains(stdout, "my-terraform-skill") {
527 t.Fatalf("search should find local match:\n%s", stdout)
528 }
529 // Should NOT contain GitHub results header.
530 if strings.Contains(stdout, "Showing") && strings.Contains(stdout, "REPOSITORY") {
531 t.Fatalf("--local should skip GitHub search:\n%s", stdout)
532 }
533}
534
535// ============================================================================
536// alias

Callers

nothing calls this directly

Calls 3

isolatedHomeFunction · 0.85
seedEntityFunction · 0.85
executeFunction · 0.85

Tested by

no test coverage detected