(t *testing.T, schema *jsonschema.Schema, data []byte)
| 367 | } |
| 368 | |
| 369 | func assertJSONBytesValidateAgainstSchema(t *testing.T, schema *jsonschema.Schema, data []byte) { |
| 370 | t.Helper() |
| 371 | |
| 372 | value := decodeJSONValueForSchema(t, data) |
| 373 | if err := schema.Validate(value); err != nil { |
| 374 | t.Fatalf("JSON output does not validate against public schema: %v\noutput: %s", err, string(data)) |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | func writeJSONSchemaTempFile(t *testing.T, name, content string) string { |
| 379 | t.Helper() |
no test coverage detected