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

Function loadJSONGoldenSuccessOutputs

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

Source from the content-addressed store, hash-verified

548}
549
550func loadJSONGoldenSuccessOutputs(t *testing.T) map[string]json.RawMessage {
551 t.Helper()
552
553 data, err := os.ReadFile("testdata/json_contract/success_outputs.json")
554 if err != nil {
555 t.Fatalf("read golden success output fixture: %v", err)
556 }
557
558 var fixtures map[string]json.RawMessage
559 if err := json.Unmarshal(data, &fixtures); err != nil {
560 t.Fatalf("decode golden success output fixture: %v", err)
561 }
562 if len(fixtures) == 0 {
563 t.Fatalf("golden success output fixture has no commands")
564 }
565 return fixtures
566}
567
568func loadJSONGoldenErrorOutputs(t *testing.T) map[string]json.RawMessage {
569 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected