(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestGitFallbackRequiresNonEmptyRef(t *testing.T) { |
| 55 | t.Run("all files fallback validates ref", func(t *testing.T) { |
| 56 | _, err := listDirAllFilesViaGitForHost("owner", "repo", "", "skills/demo", "") |
| 57 | if err == nil { |
| 58 | t.Fatal("expected error for empty ref") |
| 59 | } |
| 60 | if !strings.Contains(err.Error(), "non-empty ref") { |
| 61 | t.Fatalf("expected non-empty ref error, got %q", err) |
| 62 | } |
| 63 | }) |
| 64 | |
| 65 | t.Run("subdirs fallback validates ref", func(t *testing.T) { |
| 66 | _, err := listDirSubdirsViaGitForHost("owner", "repo", " ", "skills", "") |
| 67 | if err == nil { |
| 68 | t.Fatal("expected error for empty ref") |
| 69 | } |
| 70 | if !strings.Contains(err.Error(), "non-empty ref") { |
| 71 | t.Fatalf("expected non-empty ref error, got %q", err) |
| 72 | } |
| 73 | }) |
| 74 | } |
| 75 | |
| 76 | func TestListContentsRecursivelyWithDepth_MaxDepthGuard(t *testing.T) { |
| 77 | _, err := listContentsRecursivelyWithDepth(nil, "owner", "repo", "main", "skills/demo/deep", 11, 10) |
nothing calls this directly
no test coverage detected