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

Function assertGoldenSuccessOutputStatuses

cmd/json_contract_test.go:647–668  ·  view source on GitHub ↗
(t *testing.T, command string, fixture json.RawMessage)

Source from the content-addressed store, hash-verified

645}
646
647func assertGoldenSuccessOutputStatuses(t *testing.T, command string, fixture json.RawMessage) {
648 t.Helper()
649
650 var got jsonOperationOutput
651 if err := json.Unmarshal(fixture, &got); err != nil {
652 t.Fatalf("decode golden output for %q: %v", command, err)
653 }
654 for i, result := range got.Results {
655 if result.Status == "" {
656 t.Errorf("golden output for %q result %d has empty status", command, i)
657 }
658 if result.Status == "unknown" {
659 t.Errorf("golden output for %q result %d must not use unknown status", command, i)
660 }
661 if result.Kind == "" {
662 t.Errorf("golden output for %q result %d has empty kind", command, i)
663 }
664 if result.Kind == "unknown" {
665 t.Errorf("golden output for %q result %d must not use unknown kind", command, i)
666 }
667 }
668}
669
670func assertGoldenErrorOutputShape(t *testing.T, name string, fixture json.RawMessage) {
671 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected