From fab73be17e20fe201f1bb69a56bd600a818da83f Mon Sep 17 00:00:00 2001 From: ShootingStar91 Date: Thu, 21 Sep 2023 16:22:02 +0300 Subject: [PATCH] Add npm script for running updater tests --- README.md | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 99e8a99e4..9192a7b86 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ Some useful commands are defined in `package.json` and can be run with `npm run - `npm run both`: starts oodikone and updater with anonymized data - `npm run both:real`: starts oodikone and updater with real data - `npm run docker:down`: stops the whole environment +- `npm run testupdater`: runs tests for updater - `npm run flushredis`: Clears redis, which forces big calculations to be redone in e.g. studyprogramme overview and faculty views. Once you have ran setup for oodikone , you can just execute the first one (`npm run oodikone`). After starting and waiting for a while for containers to compile, oodikone can be accessed at [http://localhost:3000/](http://localhost:3000/) and Adminer (database investigation tool) at [http://localhost:5050/](http://localhost:5050/). Adminer requires you to login with username `postgres` and with any password you choose (for example `p`). diff --git a/package.json b/package.json index dbd14cf58..d011879c4 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "both": "./run.sh both anon up --detach", "both:real": "./run.sh both real up --detach", "docker:down": "./run.sh both anon down --remove-orphans; ./run.sh both real down --remove-orphans", + "testupdater": "docker-compose --file docker-compose.ci.yml up --detach --no-recreate sis-updater-worker && SCHEDULE_IMMEDIATE=weekly EXIT_AFTER_IMMEDIATES=yes docker-compose --file docker-compose.ci.yml run sis-updater-scheduler npm start", "flushredis": "docker exec -it redis redis-cli flushall", "prepare": "husky install", "rapodiff": "docker exec backend node /opt/app-root/src/src/rapodiff.js"