--local skips GitHub and only searches local store + configured repos.
(t *testing.T)
| 517 | |
| 518 | // --local skips GitHub and only searches local store + configured repos. |
| 519 | func 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 |
nothing calls this directly
no test coverage detected