Skip to content
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

Fix test_checklicense_api #531

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix test_checklicense_api #531

wants to merge 2 commits into from

Conversation

rtgdk
Copy link
Collaborator

@rtgdk rtgdk commented Apr 7, 2024

Fixing #530

Had some free time, trying to make all tests run successfully - both locally and via PyCharm.
PyCharm debugger is very helpful to fix these issues faster.
Will be fixing more tests in app/tests.py as well.

  • Fixed test_checklicense_api where response structure changed
  • Fixed core.py with proper exception handling

Now only 2 tests in api are failing - both with rdf file
Screenshot 2024-04-07 at 2 56 53 PM

@goneall Has there been any change with verifying RDF files. Both the remaining tests are failing as an exception is raised by verifyclass.verify JVM call to verify RDF files - 'org.spdx.library.model.SpdxIdInUseException: Can not create Apache-2.0. It is already in use with type License which is incompatible with type ListedLicense')

@rtgdk rtgdk requested a review from goneall April 7, 2024 09:40
@rtgdk
Copy link
Collaborator Author

rtgdk commented Apr 7, 2024

@goneall Is there a better RDF file we can use for tests? The current one - https://github.com/spdx/spdx-online-tools/blob/main/src/examples/SPDXRdfExample-v2.0.rdf - raise issues like 'org.spdx.library.model.SpdxIdInUseException: Can not create Apache-2.0. It is already in use with type License which is incompatible with type ListedLicense'). Tried with this 2.1 version as well but same issue - https://github.com/spdx/tools/blob/master/Examples/SPDXRdfExample-v2.1.rdf

@goneall
Copy link
Member

goneall commented Apr 7, 2024

@goneall Is there a better RDF file we can use for tests? The current one - https://github.com/spdx/spdx-online-tools/blob/main/src/examples/SPDXRdfExample-v2.0.rdf - raise issues like 'org.spdx.library.model.SpdxIdInUseException: Can not create Apache-2.0. It is already in use with type License which is incompatible with type ListedLicense'). Tried with this 2.1 version as well but same issue - https://github.com/spdx/tools/blob/master/Examples/SPDXRdfExample-v2.1.rdf

The test files in the tools-java repo should work - as long as we're using the same version of the java tools.

BTW - I'll be offline for the next 3 days or so, so may be a bit slow to respond.

@rtgdk
Copy link
Collaborator Author

rtgdk commented Apr 8, 2024

@goneall Thanks for the help! The new files worked perfectly! Now all the tests in api are passing, except one which is getting skipped. Will try to run that too after setting up test repos for submit license tool.
Screenshot 2024-04-08 at 10 31 17 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants