Skip to content

Commit 871293b

Browse files
committed
PI-2517 - update integration tests
1 parent e233aad commit 871293b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Dockerfile.prism

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ ADD https://probation-offender-search-dev.hmpps.service.justice.gov.uk/v3/api-do
1616
ADD https://ministryofjustice.github.io/hmpps-probation-integration-services/tech-docs/projects/effective-proposal-framework-and-delius/api-docs.json /prismMocks/probation-integration-epf.json
1717
ADD https://prisoner-search-dev.prison.service.justice.gov.uk/v3/api-docs /tmp/prisoner-offender-search-tmp.json
1818

19-
COPY src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/prismMocks/case-notes-dev.json /prismMocks/case-notes.json
20-
2119
RUN jq 'del(.components.schemas.Query.properties.subQueries)' /tmp/prisoner-offender-search-tmp.json > /tmp/prisoner-offender-search-tmp1.json
2220
RUN swagger-cli bundle -r -o /prismMocks/prisoner-offender-search.json /tmp/prisoner-offender-search-tmp1.json
2321
RUN swagger-cli bundle -r -o /prismMocks/adjudications.json /tmp/adjudications.json
@@ -28,11 +26,13 @@ RUN jq 'del(.components.schemas.ResidentialLocation.properties.subLocations.item
2826
RUN jq 'del(.components.schemas.LocationGroup.properties.children.items)' /tmp/prison-api.json > /tmp/prison-api-tmp.json && mv /tmp/prison-api-tmp.json /tmp/prison-api.json
2927
RUN swagger-cli bundle -r -o /prismMocks/prison-api-1.json /tmp/prison-api.json
3028

31-
RUN jq 'del(.components.schemas.CaseNoteFilter.required)' /tmp/case-notes.json > /tmp/case-notes.tmp.json && mv /tmp/case-notes.tmp.json /tmp/case-notes.json
29+
RUN jq 'del(.components.schemas.CaseNoteFilter.required)' /tmp/case-notes.json > /tmp/case-notes.tmp.json && mv /tmp/case-notes.tmp.json /prismMocks/case-notes.json
3230

3331
RUN sed -i 's/\*\/\*/application\/json/g' /prismMocks/adjudications.json
3432
RUN sed -i 's/\*\/\*/application\/json/g' /prismMocks/assess-risks-and-needs.json
3533
RUN sed -i 's/\*\/\*/application\/json/g' /prismMocks/case-notes.json
3634
RUN sed -i 's/\*\/\*/application\/json/g' /prismMocks/prisoner-offender-search.json
3735

36+
COPY src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/prismMocks/create-and-vary-licence.json /prismMocks/create-and-vary-a-licence.json
37+
3838
ENTRYPOINT sh -c 'port=4010; for file in $(ls /prismMocks/*.json | sort); do node dist/index.js mock -p $port -h 0.0.0.0 $file & port=$((port + 1)); done; wait'

src/test/resources/expected-responses/person-needs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"data": {
3-
"assessedOn": "2024-09-09T14:22:03",
3+
"assessedOn": "2024-09-04T01:01:29",
44
"identifiedNeeds": [
55
{
66
"type": "DRUG_MISUSE",

src/test/resources/expected-responses/person-risk-plan

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"data": [
33
{
44
"assessmentId": "-9007199254740991",
5-
"dateCompleted": "2024-09-09T14:22:03",
6-
"initiationDate": "2024-09-09T14:22:03",
5+
"dateCompleted": "2024-09-04T01:01:29",
6+
"initiationDate": "2024-09-04T01:01:29",
77
"assessmentStatus": "string",
88
"assessmentType": "string",
99
"keyInformationCurrentSituation": "string",
@@ -13,8 +13,8 @@
1313
"interventionsAndTreatment": "string",
1414
"victimSafetyPlanning": "string",
1515
"contingencyPlans": "string",
16-
"latestSignLockDate": "2024-09-09T14:22:03",
17-
"latestCompleteDate": "2024-09-09T14:22:03"
16+
"latestSignLockDate": "2024-09-04T01:01:29",
17+
"latestCompleteDate": "2024-09-04T01:01:29"
1818
}
1919
],
2020
"pagination": {

src/test/resources/expected-responses/person-risk-scores

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"data": [
33
{
4-
"completedDate": "2024-09-09T14:22:03",
4+
"completedDate": "2024-09-04T01:01:29",
55
"assessmentStatus": "string",
66
"generalPredictor": {
77
"scoreLevel": "LOW"

src/test/resources/expected-responses/person-risk-serious-harm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"data": {
3-
"assessedOn": "2024-09-09T14:22:03",
3+
"assessedOn": "2024-09-04T01:01:29",
44
"riskToSelf": {
55
"suicide": {
66
"risk": "YES",

0 commit comments

Comments
 (0)