Skip to content

Commit

Permalink
Grad2-2632 school api call is replaced with trax api. (#260)
Browse files Browse the repository at this point in the history
* Grad2-2632 school api call is replaced with trax api.

* Grad2-2632 modifications made

* Grad2-2632 Changed constant reference.
  • Loading branch information
githubmamatha authored May 10, 2024
1 parent b8b80c1 commit e48a88e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public CommonSchool getCommonSchoolDetails(String mincode, ExceptionMessage exce
mincode
);
} catch (Exception e) {
exception.setExceptionName("SCHOOL-API IS DOWN");
exception.setExceptionName(EducDistributionApiConstants.TRAX_API_STATUS);
exception.setExceptionDetails(e.getLocalizedMessage());
}
return commonSchool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class EducDistributionApiConstants {
public static final String ASSESSMENT_LTE = "LTE10";
public static final String ASSESSMENT_LTP = "LTP10";

public static final String TRAX_API_STATUS = "TRAX-API IS DOWN";

@Value("${endpoint.grad-graduation-report-api.get-transcript-list.url}")
private String transcriptDistributionList;

Expand Down Expand Up @@ -92,7 +94,7 @@ public class EducDistributionApiConstants {
@Value("${endpoint.keycloak.getToken}")
private String tokenUrl;

@Value("${endpoint.educ-school-api.school-by-min-code.url}")
@Value("${endpoint.grad-trax-api.commonschool-by-mincode.url}")
private String commonSchoolByMincode;

@Value("${endpoint.grad-trax-api.psi-by-psi-code.url}")
Expand Down
7 changes: 4 additions & 3 deletions api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,17 @@ endpoint:
url: ${GRAD_GRADUATION_API}api/v1/graduate/report/schooldistrictsupp?slrt=%s&drt=%s&srt=%s
school_labels_report:
url: ${GRAD_GRADUATION_API}api/v1/graduate/report/school/labels?reportType=%s
educ-school-api:
school-by-min-code:
url: ${EDUC_SCHOOL_API}api/v1/schools/%s


grad-trax-api:
psi-by-psi-code:
url: ${GRAD_TRAX_API}api/v1/trax/psi/%s
school-by-min-code:
url: ${GRAD_TRAX_API}api/v1/trax/school/%s
district-by-dist-code:
url: ${GRAD_TRAX_API}api/v1/trax/district/%s
commonschool-by-mincode:
url: ${GRAD_TRAX_API}api/v1/trax/school/common/%s
grad-batch-graduation-api:
distribution:
notify-completion:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void testGetCommonSchoolDetails_Exception() {

var response = this.schoolService.getCommonSchoolDetails("234567", exceptionMessage);
Assert.assertNull(response);
Assert.assertEquals("SCHOOL-API IS DOWN", exceptionMessage.getExceptionName());
Assert.assertEquals(EducDistributionApiConstants.TRAX_API_STATUS, exceptionMessage.getExceptionName());
}

@Test
Expand Down
6 changes: 3 additions & 3 deletions api/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,16 @@ endpoint:
url: https://educ-grad-graduation-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/graduate/report/schooldistrictsupp?slrt=%s&drt=%s&srt=%s
school_labels_report:
url: https://educ-grad-graduation-api-77c02f-dev.apps.silver.devops.gov.bc.caapi/v1/graduate/report/school/labels?reportType=%s
educ-school-api:
school-by-min-code:
url: https://educ-school-api-75e61b-dev.apps.silver.devops.gov.bc.ca/api/v1/schools/%s

grad-trax-api:
psi-by-psi-code:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/psi/%s
school-by-min-code:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/school/%s
district-by-dist-code:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/district/%s
commonschool-by-mincode:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/school/common/%s
grad-batch-graduation-api:
distribution:
notify-completion:
Expand Down

0 comments on commit e48a88e

Please sign in to comment.