-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# Back-end | ||
|
||
# API | ||
Περιεχόμενα: | ||
|
||
- RESTful API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# CLI | ||
|
||
## Instructions | ||
- Install [python3](https://www.python.org/downloads/), if not already installed. | ||
|
||
- Install requests python package, if not already installed: | ||
``` | ||
$ pip install requests | ||
``` | ||
|
||
- Add the CLI path to your OS $PATH to be able to run the CLI commands without the prefix "./" for the executables (e.g. as shown below, valid for one session): | ||
``` | ||
$ PATH=$PATH:/home/username/TL21-23/cli | ||
``` | ||
|
||
- Make sure the ```mongod``` process is running and that you have started the server and that it has connected to the database, as shown in the project README.md. | ||
|
||
- Use the CLI as specified in the documents, examples shown below: | ||
``` | ||
$ se2123 healthcheck | ||
$ se2123 chargesby --op1 aodos --datefrom 20211005 --dateto 20211110 --format json | ||
$ se2123 admin --passesupd --source /home/username/TL21-23/backend/passes.csv | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# test-cli | ||
|
||
## Instructions | ||
- Follow the instructions documented on the cli README.md | ||
|
||
- This time, use the tldb-test database, by running the following on **/backend**: | ||
``` | ||
$ npm run test_cli | ||
``` | ||
|
||
- Install pytest framework, if not already installed: | ||
``` | ||
$ pip install pytest | ||
``` | ||
|
||
- Run the admin and main tests using pytest, as shown below (follow this order): | ||
``` | ||
$ pytest admin.py | ||
$ pytest main.py | ||
``` |