Skip to content

Commit

Permalink
Release v1.0.0 to main merge (#2046)
Browse files Browse the repository at this point in the history
Merging the changes for Release v1.0.0 into the main branch.
  • Loading branch information
andrewsignori-aot authored Jun 26, 2023
2 parents 0fdbe8f + 6713338 commit d521713
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 199 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ High, new features released weekly
- [Technologies Overview](./docs/technologies-overview.md)
- [BCeID-Web Service Integration](./docs/bceid-webservice-integration.md)
- How To
- [DevOps](./docs/howto/devops.md)
- [DevOps](https://github.com/bcgov/SIMS/wiki/DevOps-and-Running-the-Application#devops)
- [Database Migration](./docs/howto/db-migration.md)
- [Keycloak Configuration](./docs/hotwot/keycloak-config.md)
- [Keycloak Configuration](https://github.com/bcgov/SIMS/wiki/Keycloak-Config)

## License

Expand Down
4 changes: 3 additions & 1 deletion devops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ deploy-redis:
# Command to initialize the redis cluster.
# Make sure that all the redis pods are up and running before initializing the cluster.
init-redis-cluster:
@oc exec -n $(NAMESPACE) -it redis-0 -- redis-cli -a $(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d) --cluster create --cluster-replicas 1 $(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')
REDIS_PASSWORD=$$(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d); \
REDIS_NODES=$$(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 ' | sed 's/ :6379 $$/ /'); \
oc exec -n $(NAMESPACE) -it redis-0 -- redis-cli -a $$REDIS_PASSWORD --cluster create $$REDIS_NODES --cluster-replicas 1

create-db:
test -n $(DB_NAME)
Expand Down
4 changes: 0 additions & 4 deletions devops/openshift/database/patroni-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ objects:
role: master
cluster-name: ${NAME}
app.kubernetes.io/name: patroni
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
181 changes: 0 additions & 181 deletions docs/howto/devops.md

This file was deleted.

1 change: 1 addition & 0 deletions sources/packages/backend/apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN npm ci
# Copying sources.
COPY ./apps/api ./apps/api
COPY ./libs ./libs
COPY ./apps/db-migrations ./apps/db-migrations

# Building app
RUN npm run build api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,30 @@ describe("ConfirmationOfEnrollmentInstitutionsController(e2e)-getCOESummary", ()
});
});

it("Should return a BadRequest error when the page number has an invalid integer.", async () => {
// Arrange
const collegeCLocation = createFakeInstitutionLocation(collegeC);
await authorizeUserTokenForLocation(
appDataSource,
InstitutionTokenTypes.CollegeCUser,
collegeCLocation,
);
const invalidPage = Number.MAX_SAFE_INTEGER + 1;
const endpoint = `/institutions/location/${collegeCLocation.id}/confirmation-of-enrollment/enrollmentPeriod/${EnrollmentPeriod.Current}?page=${invalidPage}&pageLimit=10&sortField=disbursementDate&sortOrder=ASC`;
const token = await getInstitutionToken(InstitutionTokenTypes.CollegeCUser);

// Act/Assert
await request(app.getHttpServer())
.get(endpoint)
.auth(token, BEARER_AUTH_TYPE)
.expect(HttpStatus.BAD_REQUEST)
.expect({
statusCode: HttpStatus.BAD_REQUEST,
message: ["page must not be greater than 9007199254740991"],
error: "Bad Request",
});
});

it("Should get the COE upcoming summary when there are 2 COEs available.", async () => {
// Arrange
const collegeCLocation = createFakeInstitutionLocation(collegeC);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ abstract class PaginationOptionsAPIInDTO {
* Page number.
*/
@Min(0)
@Max(Number.MAX_SAFE_INTEGER)
page: number;
/**
* Page size or records per page.
Expand Down
26 changes: 15 additions & 11 deletions sources/packages/forms/src/form-definitions/educationprogram.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"title": "Education Program",
"display": "form",
"type": "form",
"name": "educationProgram",
"path": "educationprogram",
"type": "form",
"display": "form",
"tags": [
"common"
],
Expand Down Expand Up @@ -816,7 +816,8 @@
"addons": [],
"inputType": "text",
"id": "e7oydq",
"defaultValue": ""
"defaultValue": "",
"isNew": false
},
{
"label": "Field of study code",
Expand Down Expand Up @@ -917,7 +918,7 @@
"labelWidth": "",
"labelMargin": "",
"placeholder": "",
"description": "Format (####) Optional**",
"description": "Format (#####) Optional**",
"tooltip": "",
"prefix": "",
"suffix": "",
Expand Down Expand Up @@ -961,8 +962,8 @@
"maxLength": "",
"minWords": "",
"maxWords": "",
"pattern": "[0-9]{4}",
"customMessage": "Incorrect Format'",
"pattern": "[0-9]{5}",
"customMessage": "Incorrect Format",
"custom": "",
"customPrivate": false,
"json": "",
Expand All @@ -977,7 +978,7 @@
"tags": [],
"properties": {},
"conditional": {
"show": null,
"show": "",
"when": null,
"eq": "",
"json": ""
Expand Down Expand Up @@ -1022,7 +1023,8 @@
"addons": [],
"inputType": "text",
"id": "esqh37ui",
"defaultValue": ""
"defaultValue": "",
"lockKey": true
},
{
"label": "SABC program code, if this program has been approved for SABC funding before",
Expand Down Expand Up @@ -1090,7 +1092,7 @@
"tags": [],
"properties": {},
"conditional": {
"show": null,
"show": "",
"when": null,
"eq": "",
"json": ""
Expand Down Expand Up @@ -2064,7 +2066,8 @@
"allowMultipleMasks": false,
"addons": [],
"tag": "p",
"id": "eaximc"
"id": "eaximc",
"className": ""
},
{
"label": "Program length",
Expand Down Expand Up @@ -5906,7 +5909,8 @@
"allowMultipleMasks": false,
"addons": [],
"tag": "p",
"id": "exxean"
"id": "exxean",
"className": ""
},
{
"label": "I confirm this program meets the policies outlined in the StudentAid BC policy manual.",
Expand Down

0 comments on commit d521713

Please sign in to comment.