MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestGetDownloadPermanentError

Function TestGetDownloadPermanentError

cmd/get_test.go:302–316  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

300}
301
302func 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
318func TestGetRecursive_DownloadsDirectoryStructure(t *testing.T) {
319 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 2

downloadFileFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected