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

Function assertGoldenCommandSchemaReferences

cmd/json_contract_test.go:1218–1230  ·  view source on GitHub ↗
(t *testing.T, command string, schema jsonGoldenCommandSchema, definitions map[string][]string)

Source from the content-addressed store, hash-verified

1216}
1217
1218func assertGoldenCommandSchemaReferences(t *testing.T, command string, schema jsonGoldenCommandSchema, definitions map[string][]string) {
1219 t.Helper()
1220
1221 refs := []string{schema.TopLevel, schema.ResultWrapper, schema.Input, schema.Result}
1222 if schema.ResultInput != nil {
1223 refs = append(refs, *schema.ResultInput)
1224 }
1225 for _, ref := range refs {
1226 if _, ok := definitions[ref]; !ok {
1227 t.Errorf("golden schema for %q references unknown definition %q", command, ref)
1228 }
1229 }
1230}
1231
1232func assertGoldenCommandStatuses(t *testing.T, command string, schema jsonGoldenCommandSchema) {
1233 t.Helper()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected