(t *testing.T)
| 300 | } |
| 301 | |
| 302 | func TestGetDownloadPermanentError(t *testing.T) { |
| 303 | tmpDir := t.TempDir() |
| 304 | dst := filepath.Join(tmpDir, "downloaded.txt") |
| 305 | |
| 306 | mock := &mockFilesClient{ |
| 307 | downloadFn: func(arg *files.DownloadArg) (*files.FileMetadata, io.ReadCloser, error) { |
| 308 | return nil, nil, &files.DownloadAPIError{} |
| 309 | }, |
| 310 | } |
| 311 | |
| 312 | err := downloadFile(mock, "/nonexistent.txt", dst) |
| 313 | if err == nil { |
| 314 | t.Error("expected error for permanent failure, got nil") |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | func TestGetRecursive_DownloadsDirectoryStructure(t *testing.T) { |
| 319 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected