(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestStructuredOutputGoldenErrorOutputAudit(t *testing.T) { |
| 154 | fixtures := loadJSONGoldenErrorOutputs(t) |
| 155 | examples := jsonGoldenErrorOutputExamples() |
| 156 | schema := compileJSONSchemaFile(t, "../docs/json-schema/v1/error.schema.json") |
| 157 | |
| 158 | for name, fixture := range fixtures { |
| 159 | if _, ok := examples[name]; !ok { |
| 160 | t.Errorf("golden error output includes unknown example %q", name) |
| 161 | } |
| 162 | if err := schema.Validate(decodeJSONValueForSchema(t, fixture)); err != nil { |
| 163 | t.Errorf("golden error output for %q does not validate: %v", name, err) |
| 164 | } |
| 165 | assertGoldenErrorOutputShape(t, name, fixture) |
| 166 | } |
| 167 | for name, example := range examples { |
| 168 | fixture, ok := fixtures[name] |
| 169 | if !ok { |
| 170 | t.Errorf("code-derived error output example %q has no golden output", name) |
| 171 | continue |
| 172 | } |
| 173 | assertGoldenJSONEqual(t, name, fixture, example) |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | func TestAccountAuthContractOmitsSensitiveFields(t *testing.T) { |
| 178 | example := jsonGoldenSuccessOutputExamples()["account"] |
nothing calls this directly
no test coverage detected