-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement mint legacy api endpoints #2201
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2327d02
Implement mint legacy api endpoint initial commit
alejandro-bulgaris-qcif 7cbc5be
Add legacy harvest endpoint backwards compatible with mint harvest
alejandro-bulgaris-qcif 6dccf0b
Add api endpoint to search a harvest record
alejandro-bulgaris-qcif 95550ab
Add bruno tests for legacy mint api endpoints
alejandro-bulgaris-qcif 367c359
Update bruno tests sequence
alejandro-bulgaris-qcif 4ade81f
Remove parties solr core not required in config
alejandro-bulgaris-qcif a5aa96e
Remove search harvest record endpoint and improve bruno tests
alejandro-bulgaris-qcif afb0182
More improvements to bruno tests
alejandro-bulgaris-qcif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,5 +283,4 @@ module.exports.workflow = { | |
consolidated: true | ||
} | ||
} | ||
|
||
}; |
53 changes: 53 additions & 0 deletions
53
test/bruno/1 - REST API/1 - Record Management/Create HARVEST Legacy Record.bru
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
meta { | ||
name: Create HARVEST Legacy Record | ||
type: http | ||
seq: 32 | ||
} | ||
|
||
post { | ||
url: {{host}}/default/rdmp/api/mint/harvest/rdmp | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
Content-Type: application/json | ||
Authorization: Bearer {{token}} | ||
} | ||
|
||
body:json { | ||
{ | ||
"records": [ | ||
{ | ||
"harvest_id": "s123456", | ||
"metadata": { | ||
"data": { | ||
"ID": "s123456", | ||
"GIVEN_NAME": "Andrew", | ||
"OTHER_NAMES": "", | ||
"FAMILY_NAME": "S", | ||
"PREF_NAME": "", | ||
"HONORIFIC": "", | ||
"EMAIL": "[email protected]", | ||
"JOB_TITLE": "Assistant Professor", | ||
"URI": "", | ||
"NLA_PARTY_IDENTIFIER": "", | ||
"ORCID": "0000-0001-7269-2286", | ||
"PERSONAL_HOMEPAGE": "", | ||
"STAFF_PROFILE_HOMEPAGE": "", | ||
"DESCRIPTION": "", | ||
"RESEARCH_ELEMENTS_USER_ID": "12345678" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
tests { | ||
|
||
test("Status code is 200", function () { | ||
expect(res.getStatus()).to.equal(200); | ||
}); | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
test/bruno/1 - REST API/1 - Record Management/Create HARVEST Record.bru
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
meta { | ||
name: Create HARVEST Record | ||
type: http | ||
seq: 33 | ||
} | ||
|
||
post { | ||
url: {{host}}/default/rdmp/api/records/harvest/rdmp | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
Content-Type: application/json | ||
Authorization: Bearer {{token}} | ||
} | ||
|
||
body:json { | ||
{ | ||
"records": [ | ||
{ | ||
"harvestId": "s123456", | ||
"recordRequest": { | ||
"metadata": { | ||
"ID": "s123456", | ||
"GIVEN_NAME": "Andrew", | ||
"OTHER_NAMES": "", | ||
"FAMILY_NAME": "S", | ||
"PREF_NAME": "", | ||
"HONORIFIC": "", | ||
"EMAIL": "[email protected]", | ||
"JOB_TITLE": "Assistant Professor", | ||
"URI": "", | ||
"NLA_PARTY_IDENTIFIER": "", | ||
"ORCID": "0000-0001-7269-2286", | ||
"PERSONAL_HOMEPAGE": "", | ||
"STAFF_PROFILE_HOMEPAGE": "", | ||
"DESCRIPTION": "", | ||
"RESEARCH_ELEMENTS_USER_ID": "12345678" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
tests { | ||
|
||
test("Status code is 200", function () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add some tests that check the response body is structured correctly? |
||
expect(res.getStatus()).to.equal(200); | ||
}); | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
test/bruno/1 - REST API/1 - Record Management/Get HARVEST Record Metadata.bru
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
meta { | ||
name: Get HARVEST Record-s Metadata | ||
type: http | ||
seq: 34 | ||
} | ||
|
||
get { | ||
url: {{host}}/default/rdmp/api/mint/harvest/search?harvestId=s123456&recordType=rdmp | ||
body: none | ||
auth: none | ||
} | ||
|
||
headers { | ||
Authorization: Bearer {{token}} | ||
~: | ||
} | ||
|
||
tests { | ||
test("Status code is 200", function () { | ||
expect(res.getStatus()).to.equal(200); | ||
}); | ||
|
||
test("ID is correct", function () { | ||
var jsonData = res.getBody(); | ||
expect(jsonData.ID).to.eql("s123456"); | ||
}); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need the ingest harvest. Search will be performed with existing endpoints already covered in the first work package. Future work package will cover getting the form components that search legacy Mint to be able to find the records inside ReDBox.