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

Function TestResolveDestination_MetadataError

cmd/put_test.go:423–433  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

421}
422
423func TestResolveDestination_MetadataError(t *testing.T) {
424 mock := &mockFilesClient{
425 getMetadataFn: func(arg *files.GetMetadataArg) (files.IsMetadata, error) {
426 return nil, fmt.Errorf("server error 500")
427 },
428 }
429 got := resolveDestination(mock, "/local/a.txt", "/path", false)
430 if got != "/path" {
431 t.Errorf("resolveDestination = %q, want /path (fallback on error)", got)
432 }
433}
434
435func TestPutFileDestinationTrailingSlash(t *testing.T) {
436 tmpFile := filepath.Join(t.TempDir(), "a.txt")

Callers

nothing calls this directly

Calls 1

resolveDestinationFunction · 0.85

Tested by

no test coverage detected