Conversation
|
Thank you for spotting and fixing this mistake. As you pointed out in #637, the root cause here is that the test are skipped silently in the CI. If @s-heppner agrees, it would be very helpful to implement this approach here too. |
The workflow downloads them into `test/adapter/schema`, while the tests read `test/adapter/schemas`, the path `.gitignore` already covers. The files therefore never reach the tests, `JsonSerializationSchemaTest` and `XMLSerializationSchemaTest` skip their whole class on every run, and CI has been reporting `OK (skipped=2)` while validating nothing against the schema. Signed-off-by: LGUIUX <phdl@outlook.es>
7bafa1f to
fad0f6e
Compare
The schema validation tests skip their whole class when the schema files are missing. That is right for a local run, but it is also what let the misplaced download in CI go unnoticed. Follow the approach of the server's Docker integration tests: with `REQUIRE_SCHEMA_TESTS` set, a missing schema file is an error instead of a skip. `pr.yml` sets it for the unittest step; local runs are unaffected. Signed-off-by: LGUIUX <phdl@outlook.es>
|
Thanks, that addresses the actual root cause better than the path fix alone. I've added it here as a separate commit, so it's easy to drop if @s-heppner would rather keep this PR to the path:
Checked from The CouchDB tests skip the same way when the service isn't reachable. I left them alone to keep this about the schemas, but the same switch would work there if you want it. |
Fixes #637.
pr.ymldownloads the schema files into./test/adapter/schema, while the tests read../schemas/, that istest/adapter/schemas, the path.gitignorealready covers (L27). The files never reach the tests, soJsonSerializationSchemaTestandXMLSerializationSchemaTestskip their whole class on every run: that is theskipped=2in a green build.Renaming the directory in the workflow is enough to make them run.
Testing
Reproduced the CI layout locally, with the schemas in
test/adapter/schema, and both classes skip:With the files in
test/adapter/schemasthe 13 tests in those classes run. Two of them fail ondevelop, which is #636, fixed separately; with both changes the suite is green (282 tests).Two things I left out on purpose, happy to add either if you want them here rather than in a follow-up: making the absence of the schema fatal in CI (a missing file currently turns into a green build), and pointing the workflow and the tests at one shared constant so the two paths can't drift again.