Repository navigation
CLARIN-DSpace v9/Add ITs for create-administrator -o and the bundle licence PUT - #1491
Open
milanmajchrak wants to merge 3 commits into
Open
milanmajchrak wants to merge 3 commits into
milanmajchrak wants to merge 3 commits into
Conversation
…nseID Co-Authored-By: Claude Fable 5.1 <[email protected]>
The test without -o now checks the language from -c. The licence PUT test uses two files and reads the item metadata with a GET after each PUT. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A user with only WRITE now gets 403, and a valid licence must replace the one already on the files. The PUT response is checked to be an item. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
No dtq-dev source: tests only. The code under test (
CreateAdministrator -o,ItemAddBundleController.updateLicenseForBundle) came from 7.x in the v9 sync and had no test on either branch.Description
Integration tests for two fork features that had none:
dspace create-administrator -o <org>andPUT /api/core/items/{uuid}/bundles?licenseID=<id>. No production code changes.Instructions for Reviewers
List of changes in this PR:
CreateAdministratorIT(dspace-api): runsCreateAdministrator.mainwith-o MyOrg. The new eperson is in the Administrator group and has one confirmed user registration withorganization = MyOrg.-ostoresUNKNOWN_USER_REGISTRATIONand still takes the language from-c cs. The created eperson is deleted after each test.ClarinLicenseRestRepositoryIT.updateLicenseForBundleAttachesAndDetachesLicense: an item with two files. A PUT with one licence and then a PUT with another one leaves only the second on both bitstreams. The PUT returns an item, and a GET of the item then showsdc.rights,dc.rights.urianddc.rights.label. A PUT withlicenseID=-1removes the mappings and the metadata.updateLicenseForBundleNeedsAddRightsOnItem: 403 for a user with only WRITE on the item, 401 without a token. With the check changed to WRITE, this test fails withexpected:<403> but was:<200>.How to test:
CreateAdministratorITruns 2 tests andClarinLicenseRestRepositoryIT16, all pass.Codex review (gpt-6.2-sol, high), 3 rounds: 6 findings fixed (check
-cwithout-o, read the metadata with a GET, use two files, a WRITE-only user, replace an existing licence, check the response type). Not changed: running the command through the launcher and the literalUnknowninstead of the constant. The last round only asked for more coverage (a non-admin with ADD, the state between the two PUTs, a file in another bundle).Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.🤖 Generated with Claude Code