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

Function decodeGetOutput

cmd/get_test.go:56–70  ·  view source on GitHub ↗
(t *testing.T, stdout *bytes.Buffer)

Source from the content-addressed store, hash-verified

54}
55
56func decodeGetOutput(t *testing.T, stdout *bytes.Buffer) getOutputData {
57 t.Helper()
58
59 var got getOutputData
60 if err := json.Unmarshal(stdout.Bytes(), &got); err != nil {
61 t.Fatalf("decode get JSON output: %v\noutput: %s", err, stdout.String())
62 }
63 if got.Warnings == nil {
64 t.Fatalf("warnings = nil, want empty array")
65 }
66 if len(got.Warnings) != 0 {
67 t.Fatalf("warnings = %+v, want empty", got.Warnings)
68 }
69 return got
70}
71
72func getTestFileMetadata(path string, size uint64) *files.FileMetadata {
73 return &files.FileMetadata{

Calls

no outgoing calls

Tested by

no test coverage detected