(t *testing.T, data []byte)
| 564 | } |
| 565 | |
| 566 | func decodeRelocationOutput(t *testing.T, data []byte) relocationOutput { |
| 567 | t.Helper() |
| 568 | var got relocationOutput |
| 569 | if err := json.Unmarshal(data, &got); err != nil { |
| 570 | t.Fatalf("decode JSON output: %v\noutput: %s", err, string(data)) |
| 571 | } |
| 572 | if got.Input == nil { |
| 573 | t.Fatalf("input = nil, want empty object") |
| 574 | } |
| 575 | if len(got.Input) != 0 { |
| 576 | t.Fatalf("input = %+v, want empty object", got.Input) |
| 577 | } |
| 578 | if got.Warnings == nil { |
| 579 | t.Fatalf("warnings = nil, want empty array") |
| 580 | } |
| 581 | if len(got.Warnings) != 0 { |
| 582 | t.Fatalf("warnings = %+v, want empty", got.Warnings) |
| 583 | } |
| 584 | return got |
| 585 | } |
| 586 | |
| 587 | func relocationTestFileMetadata(pathDisplay string, size uint64) *files.FileMetadata { |
| 588 | metadata := files.NewFileMetadata(path.Base(pathDisplay), "id:"+path.Base(pathDisplay), dropbox.DBXTime(time.Time{}), dropbox.DBXTime(time.Time{}), "rev", size) |
no outgoing calls
no test coverage detected