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

Function TestJSONErrorDetailsIncludesJoinedErrorDetails

cmd/output_test.go:569–579  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

567}
568
569func TestJSONErrorDetailsIncludesJoinedErrorDetails(t *testing.T) {
570 err := errors.Join(
571 partialStdoutError(7),
572 invalidArgumentsErrorWithDetails("missing path", flagErrorDetails("path")),
573 )
574
575 details := jsonErrorDetails(err)
576 if details["bytes_written"] != int64(7) || details["flag"] != "path" {
577 t.Fatalf("details = %+v, want joined error details", details)
578 }
579}
580
581func TestRenderCommandErrorIncludesDropboxAPIEndpointDetails(t *testing.T) {
582 var stdout bytes.Buffer

Callers

nothing calls this directly

Calls 4

partialStdoutErrorFunction · 0.85
flagErrorDetailsFunction · 0.85
jsonErrorDetailsFunction · 0.85

Tested by

no test coverage detected