diff --git a/api/src/main/java/ca/bc/gov/educ/grad/report/utils/EducGradReportApiConstants.java b/api/src/main/java/ca/bc/gov/educ/grad/report/utils/EducGradReportApiConstants.java index 917d8213..c1baf85f 100644 --- a/api/src/main/java/ca/bc/gov/educ/grad/report/utils/EducGradReportApiConstants.java +++ b/api/src/main/java/ca/bc/gov/educ/grad/report/utils/EducGradReportApiConstants.java @@ -35,7 +35,7 @@ public class EducGradReportApiConstants { @Value("${endpoint.educ-grad-trax-api.get-district-details.url}") private String districtDetails; - @Value("${endpoint.educ-grad-trax-api.school-by-min-code.url}") + @Value("${endpoint.educ-grad-trax-api.school-by-school-id.url}") private String schoolDetails; @Value("${endpoint.educ-grad-trax-api.country-by-code.url}") diff --git a/api/src/main/resources/application.yaml b/api/src/main/resources/application.yaml index bb7bc867..728c1d91 100644 --- a/api/src/main/resources/application.yaml +++ b/api/src/main/resources/application.yaml @@ -101,7 +101,7 @@ endpoint: educ-grad-trax-api: get-district-details: url: ${GRAD_TRAX_API}api/v2/trax/district?distNo=%s - school-by-min-code: + school-by-school-id: url: ${GRAD_TRAX_API}api/v2/trax/school-clob/%s country-by-code: url: ${GRAD_TRAX_API}api/v1/trax/code/country/%s diff --git a/api/src/test/java/ca/bc/gov/educ/grad/report/api/test/GradReportBaseTest.java b/api/src/test/java/ca/bc/gov/educ/grad/report/api/test/GradReportBaseTest.java index 47170d60..c8e80af6 100644 --- a/api/src/test/java/ca/bc/gov/educ/grad/report/api/test/GradReportBaseTest.java +++ b/api/src/test/java/ca/bc/gov/educ/grad/report/api/test/GradReportBaseTest.java @@ -108,6 +108,7 @@ protected School getReportDataSchool(ReportData reportData) { protected TraxSchool adaptTraxSchool(School school) { TraxSchool traxSchool = new TraxSchool(); + traxSchool.setSchoolId(school.getSchoolId()); traxSchool.setMinCode(school.getMincode()); traxSchool.setSchoolName(school.getName()); if(school.getAddress() != null) { @@ -123,7 +124,7 @@ protected TraxSchool adaptTraxSchool(School school) { protected void mockTraxSchool(TraxSchool traxSchool) { when(this.webClient.get()).thenReturn(this.requestHeadersUriMock); - when(this.requestHeadersUriMock.uri(String.format(constants.getSchoolDetails(),traxSchool.getMinCode()))).thenReturn(this.requestHeadersMock); + when(this.requestHeadersUriMock.uri(String.format(constants.getSchoolDetails(),traxSchool.getSchoolId()))).thenReturn(this.requestHeadersMock); when(this.requestHeadersMock.headers(any(Consumer.class))).thenReturn(this.requestHeadersMock); when(this.requestHeadersMock.retrieve()).thenReturn(this.responseMock); when(this.responseMock.bodyToMono(TraxSchool.class)).thenReturn(Mono.just(traxSchool)); diff --git a/api/src/test/resources/application.yaml b/api/src/test/resources/application.yaml index e0dcaeb7..658df4b1 100644 --- a/api/src/test/resources/application.yaml +++ b/api/src/test/resources/application.yaml @@ -114,7 +114,7 @@ endpoint: educ-grad-trax-api: get-district-details: url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/district?distNo=%s - school-by-min-code: + school-by-school-id: url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/school-clob/%s country-by-code: url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/code/country/%s diff --git a/api/src/test/resources/json/schoolNonGraduationReportRequest.json b/api/src/test/resources/json/schoolNonGraduationReportRequest.json index efd3afd8..40f5278e 100644 --- a/api/src/test/resources/json/schoolNonGraduationReportRequest.json +++ b/api/src/test/resources/json/schoolNonGraduationReportRequest.json @@ -10,6 +10,7 @@ "data" : { "student" : null, "school" : { + "schoolId" : "b69bc244-b93b-2a9f-d2b1-3d8ffae92866", "mincode" : "02828034", "name" : "CORRELIEU SECONDARY", "typeIndicator" : null, diff --git a/api/src/test/resources/json/studentAchievementReportRequest.json b/api/src/test/resources/json/studentAchievementReportRequest.json index 267a9be6..0a31fdae 100644 --- a/api/src/test/resources/json/studentAchievementReportRequest.json +++ b/api/src/test/resources/json/studentAchievementReportRequest.json @@ -66,6 +66,7 @@ } }, "school" : { + "schoolId" : "b69bc244-b93b-2a9f-d2b1-3d8ffae92866", "mincode" : "06398007", "name" : "SOUTH ISLAND DISTANCE EDUCATION SCHOOL", "typeIndicator" : "", diff --git a/api/src/test/resources/json/studentCertificateReportRequest-E.json b/api/src/test/resources/json/studentCertificateReportRequest-E.json index 68c73f17..54dc3d9e 100644 --- a/api/src/test/resources/json/studentCertificateReportRequest-E.json +++ b/api/src/test/resources/json/studentCertificateReportRequest-E.json @@ -46,6 +46,7 @@ "nonGradReasons" : [ ] }, "school" : { + "schoolId" : "b69bc244-b93b-2a9f-d2b1-3d8ffae92866", "mincode" : "00502001", "name" : "ROBERT EDGELL", "typeIndicator" : "", diff --git a/api/src/test/resources/json/studentCertificateReportRequest-F.json b/api/src/test/resources/json/studentCertificateReportRequest-F.json index fd13f0f0..00b37279 100644 --- a/api/src/test/resources/json/studentCertificateReportRequest-F.json +++ b/api/src/test/resources/json/studentCertificateReportRequest-F.json @@ -46,6 +46,7 @@ "nonGradReasons" : [ ] }, "school" : { + "schoolId" : "b69bc244-b93b-2a9f-d2b1-3d8ffae92866", "mincode" : "00502001", "name" : "Ecole Secondaire Mark R. Isfeld Secondary", "typeIndicator" : "", diff --git a/api/src/test/resources/json/studentCertificateReportRequest-FN.json b/api/src/test/resources/json/studentCertificateReportRequest-FN.json index 06090299..bfb75654 100644 --- a/api/src/test/resources/json/studentCertificateReportRequest-FN.json +++ b/api/src/test/resources/json/studentCertificateReportRequest-FN.json @@ -46,6 +46,7 @@ "nonGradReasons" : [ ] }, "school" : { + "schoolId" : "b69bc244-b93b-2a9f-d2b1-3d8ffae92866", "mincode" : "00502001", "name" : "ROBERT EDGELL", "typeIndicator" : "", diff --git a/api/src/test/resources/json/studentCertificateReportRequest-NOTBLANK.json b/api/src/test/resources/json/studentCertificateReportRequest-NOTBLANK.json index b8a3a07d..bf1201e6 100644 --- a/api/src/test/resources/json/studentCertificateReportRequest-NOTBLANK.json +++ b/api/src/test/resources/json/studentCertificateReportRequest-NOTBLANK.json @@ -33,6 +33,7 @@ "frenchCert": "F" }, "school" : { + "schoolId" : "b69bc244-b93b-2a9f-d2b1-3d8ffae92866", "mincode": "03699064", "name": "Ecole Secondaire Mark R. Isfeld Secondary", "typeIndicator": "", diff --git a/api/src/test/resources/json/studentTranscriptReportRequest-NOTELIG_NOPROG.json b/api/src/test/resources/json/studentTranscriptReportRequest-NOTELIG_NOPROG.json index ad93a556..3c908211 100644 --- a/api/src/test/resources/json/studentTranscriptReportRequest-NOTELIG_NOPROG.json +++ b/api/src/test/resources/json/studentTranscriptReportRequest-NOTELIG_NOPROG.json @@ -33,6 +33,7 @@ "frenchCert": "F" }, "school": { + "schoolId" : "b69bc244-b93b-2a9f-d2b1-3d8ffae92866", "mincode": "03939008", "name": "LORD BYNG SECONDARY", "typeIndicator": "",