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

Function assertGoldenCommandStatuses

cmd/json_contract_test.go:1232–1248  ·  view source on GitHub ↗
(t *testing.T, command string, schema jsonGoldenCommandSchema)

Source from the content-addressed store, hash-verified

1230}
1231
1232func assertGoldenCommandStatuses(t *testing.T, command string, schema jsonGoldenCommandSchema) {
1233 t.Helper()
1234
1235 if len(schema.Statuses) == 0 {
1236 t.Errorf("golden schema for %q has no result statuses", command)
1237 }
1238 for _, status := range schema.Statuses {
1239 if status == "unknown" {
1240 t.Errorf("golden schema for %q must not allow unknown result status", command)
1241 }
1242 }
1243 for _, kind := range schema.Kinds {
1244 if kind == "unknown" {
1245 t.Errorf("golden schema for %q must not allow unknown result kind", command)
1246 }
1247 }
1248}
1249
1250func normalizeGoldenContract(contract jsonGoldenContract) jsonGoldenContract {
1251 contract.Definitions = normalizeStringSliceMap(contract.Definitions)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected