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

Function loadJSONGoldenErrorOutputs

cmd/json_contract_test.go:568–584  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

566}
567
568func loadJSONGoldenErrorOutputs(t *testing.T) map[string]json.RawMessage {
569 t.Helper()
570
571 data, err := os.ReadFile("testdata/json_contract/error_outputs.json")
572 if err != nil {
573 t.Fatalf("read golden error output fixture: %v", err)
574 }
575
576 var fixtures map[string]json.RawMessage
577 if err := json.Unmarshal(data, &fixtures); err != nil {
578 t.Fatalf("decode golden error output fixture: %v", err)
579 }
580 if len(fixtures) == 0 {
581 t.Fatalf("golden error output fixture has no examples")
582 }
583 return fixtures
584}
585
586func loadPublicJSONSchema(t *testing.T, file string) publicJSONSchema {
587 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected