(t *testing.T, command string, schema jsonGoldenCommandSchema)
| 1230 | } |
| 1231 | |
| 1232 | func 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 | |
| 1250 | func normalizeGoldenContract(contract jsonGoldenContract) jsonGoldenContract { |
| 1251 | contract.Definitions = normalizeStringSliceMap(contract.Definitions) |
no outgoing calls
no test coverage detected