Skip to content

Commit 09c9cca

Browse files
committedJan 14, 2025·
encoding/jsonschema: fail on mismatched error messages
This means that CI will fail when the encoding/jsonschema error messages change so the error messages will not get out of step with the actual messages being produced, and developers can run `CUE_UPDATE=1 go test ./...` without the encoding/jsonschema tests failing all the time. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I4ebee17e1cacc26e12bbc5eef2e36a511d3c16cb Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207148 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent 90396e5 commit 09c9cca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎encoding/jsonschema/external_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ func testFailed(t *testing.T, m *cuetdtest.M, skipField *externaltest.Skip, p po
218218
return
219219
}
220220
if reason := (*skipField)[m.Name()]; reason != "" {
221+
qt.Assert(t, qt.Equals(reason, errStr), qt.Commentf("error message mismatch"))
221222
t.Skipf("skipping due to known error: %v", reason)
222223
}
223224
t.Fatal(errStr)

0 commit comments

Comments
 (0)
Please sign in to comment.