GLSD-20910: Create endpoint to get top level file detail from eacd-file-processor for a given file reference#29
Open
finlaypugh07 wants to merge 25 commits into
Open
GLSD-20910: Create endpoint to get top level file detail from eacd-file-processor for a given file reference#29finlaypugh07 wants to merge 25 commits into
finlaypugh07 wants to merge 25 commits into
Conversation
…le-processor for a given file reference
|
dsmith2708
requested changes
Jun 24, 2026
|
|
dsmith2708
requested changes
Jun 24, 2026
|
|
||
| import java.time.Instant | ||
|
|
||
| class FileDetailsControllerISpec extends IntegrationSpec with TestData with DefaultAwaitTimeout { |
Contributor
There was a problem hiding this comment.
we likely want to add a test in this file for the exact format the Json is being returned in. checking this we're currently seeing something like
{
"_id" : {
"$oid" : "6994a038d540b44c4403aee5"
},
"reference" : {
"value" : "08aad019-7f66-4456-8d52-93f12109876f"
},
"status" : "failed",
"requestorPID" : "12345678",
"requestorEmail" : "test@hmrc.gov.uk",
"requestorName" : "Test User",
"details" : {
"failureReason" : "REJECTED",
"message" : "MIME type application/pdf is not allowed for service"
},
"creationDateTime" : {
"$date" : {
"$numberLong" : "1771418638342"
}
}
}
Where we want to see something like:
{
"id" : "6994a038d540b44c4403aee4",
"reference" : "test-ref-789",
"status" : "approved",
"requestorPID" : "12345678",
"requestorEmail" : "test@hmrc.gov.uk",
"requestorName" : "Test User",
"details" : {
"name" : "bulk-de-enrol.csv",
"mimeType" : "text/csv",
"downloadUrl" : "http://localhost:9570/upscan/download/c5da3bd6-f118-4cde-afff-93f763bf6448",
"size" : 32270,
"checksum" : "a0acaa6039c1a94c6f5c43f144c5add07de9381f98701cb14c7c6ce2be18020b"
},
"approverDetails" : {
"approverEmail" : "approverTest@hmrc.gov.uk",
"approverPID" : "12345678",
"approverName" : "Approver1",
"errorCode" : "error code",
"errorMessage" : "error message"
},
"totalEntryCount" : 100,
"uploadedDateTime" : null,
"lastUpdatedDateTime" : null,
"approvedAtDateTime" : "2026-02-18T12:43:58.342Z",
"creationDateTime" : "2026-02-18T12:43:58.342Z",
"totalFailureCount" : 5,
"totalSuccessCount" : 95
}
So that the ID, dates etc. are in a more appropriate format
Removed redundant registration of upload result in test.
…le-processor for a given file reference
Removed redundant registration of upload result in test.
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.
Acceptance Criteria
A 'GET /file-detail/:reference' endpoint is created in the new support-routes file (created in GLSD-20951) on the new eacd-file-processor service (built in GLSD-19170) that returns the following fields for the record from the file collection that matches the given file reference:
fileName
reference
creationDateTime
errorCode
errorMessage
fileStatus
lastUpdatedDateTime
requestorEmail
requestorPID
requestorName
downloadUrl
fileMimeType
uploadTimestamp
checksum
size
failureReason
failureMessage
approverEmail
approverPID
approverName
approvalDateTime
totalEntryCount
totalSuccessCount
totalFailureCount
Internal auth is implemented on this new endpoint and configured such that only emac-support-frontend can call it
The following response status codes are implemented:
Http Code Description Error Code Error Message
200 Success A record was found and returned
204 No Content No record found for the requested reference
Relevant tests are implemented for the new functionality