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

Function decodeDuOutput

cmd/du_test.go:159–176  ·  view source on GitHub ↗
(t *testing.T, out *bytes.Buffer)

Source from the content-addressed store, hash-verified

157}
158
159func decodeDuOutput(t *testing.T, out *bytes.Buffer) duJSONOutput {
160 t.Helper()
161
162 var got duJSONOutput
163 if err := json.Unmarshal(out.Bytes(), &got); err != nil {
164 t.Fatalf("decode JSON output: %v\noutput: %s", err, out.String())
165 }
166 if got.Warnings == nil {
167 t.Fatalf("warnings = nil, want empty array")
168 }
169 if len(got.Warnings) != 0 {
170 t.Fatalf("warnings = %+v, want empty", got.Warnings)
171 }
172 if len(got.Results) != 1 {
173 t.Fatalf("results len = %d, want 1", len(got.Results))
174 }
175 return got
176}
177
178func individualSpaceUsage() *users.SpaceUsage {
179 return users.NewSpaceUsage(1024, &users.SpaceAllocation{

Callers 2

TestDuJSONTeamAllocationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected