-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: run test against actual schema files, not snapshots #256
Comments
@CycloneDX/core-team FYI @CycloneDX/java-maintainers can you help out and fix the tests? |
The latest schema from the 1.5-dev branch has been incorporated into the latest Core Java 7.4.0-SNAPSHOT |
re: #256 (comment) |
@mr-zepol mentioned he might be able to help out here. |
https://github.com/CycloneDX/cyclonedx-core-java/releases/tag/cyclonedx-core-java-10.0.0 ---- \ before this bump, some CI failed - https://github.com/CycloneDX/specification/actions/runs/12299984702/job/34327037467 due to #256 this bump uses the latest schema 🎉 Signed-off-by: Jan Kowalleck <jan.kowalleck@owasp.org>
1. enabled test runner for schema 1.7 1. copied all test cases from 1.6 to 1.7 1. renamed the files from `*.1.6.*` to `*.1.7.*` 1. migrated the test cases from schema 1.6 to schema 1.7 see the diff/delta of each individual commit for details java tests are expected to fail, as long as #256 is not done
the situation with java tests is so annoying. |
I can look at it in the weekend. |
this would be fantastic. I'll assign the ticket to you, @ppkarwasz , in hope you'll find time for it :D |
Hi @ppkarwasz , If you have no time for it, just let me know, and I will set the ticket back to "need help", just let me know :) |
I am recovering from FOSDEM, but I put this item at the top of my TODO list for this weekend. |
This change modifies the Java Unit tests to use the schemas in this repository to validate the examples, instead of those bundled in the `cyclonedx-java-core` artifact. Closes CycloneDX#256
This change modifies the Java Unit tests to use the schemas in this repository to validate the examples, instead of those bundled in the `cyclonedx-java-core` artifact. Closes CycloneDX#256
This change modifies the Java Unit tests to use the schemas in this repository to validate the examples, instead of those bundled in the `cyclonedx-java-core` artifact. Closes CycloneDX#256 Signed-off-by: Piotr P. Karwasz <piotr.github@karwasz.org>
I fixed the tests in #592. |
https://github.com/CycloneDX/cyclonedx-core-java/releases/tag/cyclonedx-core-java-10.0.0 ---- \ before this bump, some CI failed - https://github.com/CycloneDX/specification/actions/runs/12299984702/job/34327037467 due to CycloneDX#256 this bump uses the latest schema 🎉 Signed-off-by: Jan Kowalleck <jan.kowalleck@owasp.org>
https://github.com/CycloneDX/cyclonedx-core-java/releases/tag/cyclonedx-core-java-10.0.0 ---- \ before this bump, some CI failed - https://github.com/CycloneDX/specification/actions/runs/12299984702/job/34327037467 due to CycloneDX#256 this bump uses the latest schema 🎉 Signed-off-by: Jan Kowalleck <jan.kowalleck@owasp.org>
Current implementation of java tests run against a snapshot of the schema files, shipped with
org.cyclinedx
java package.This is undesired and error-prone, as changes to the schema files in this repo are not checked against the schema example files.
Therefore, most java checks in pull requests are just bogus results without any meaning.
This must change ASAP.
Use cases:
acceptance criteria
scope
valid-*.{json,xml,textproto}
should pass schema validationinvalid-*.{json,xml,textproto}
should fail schema validationtargets
specification/tools/src/test/java/org/cyclonedx/schema/JsonSchemaVerificationTest.java
Lines 60 to 61 in d37a107
specification/tools/src/test/java/org/cyclonedx/schema/XmlSchemaVerificationTest.java
Lines 64 to 65 in d37a107
out of scope (since already fixed/done)
specification/tools/src/test/php/json-schema-functional-tests.php
Lines 15 to 16 in d37a107
specification/tools/src/test/php/json-schema-lint-tests.php
Lines 5 to 6 in d37a107
specification/tools/src/test/php/json-schema-lint-tests.php
Line 16 in d37a107
specification/tools/src/test/php/xml-schema-functional-tests.php
Lines 15 to 16 in d37a107
specification/tools/src/test/js/json-schema-functional-tests.js
Lines 24 to 25 in 2003555
specification/tools/src/test/js/json-schema-lint-tests.js
Line 16 in 2003555
specification/tools/src/test/proto/test.sh
Lines 104 to 130 in 19a1530
caused by #255
related: https://cyclonedx.slack.com/archives/G01PMU9ERJA/p1687363757137109
The text was updated successfully, but these errors were encountered: