From 1d5e28effd967ef0cebdfc20c1c2fdf724f88772 Mon Sep 17 00:00:00 2001 From: nprimo Date: Tue, 21 Nov 2023 17:43:08 +0000 Subject: [PATCH] feat(crud-master-py): clarify postman requirements for audit --- subjects/devops/crud-master-py/README.md | 27 ++++++++++++------------ 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/subjects/devops/crud-master-py/README.md b/subjects/devops/crud-master-py/README.md index eda71c814..f44944286 100644 --- a/subjects/devops/crud-master-py/README.md +++ b/subjects/devops/crud-master-py/README.md @@ -73,10 +73,12 @@ The `movies` table will contain the following columns: ##### Testing the Inventory API In order to test the correctness of your API you should use Postman or a -similar tool. You could create one or more tests for every endpoint and then +similar tool. You have to create one or more tests for every endpoint and then export the configuration, so you will be able to reproduce the tests on different machines easily. +> The configuration will be checked during the audit. + #### API 2: Billing ##### Definition of the Inventory API @@ -87,11 +89,10 @@ going to be a "stringified" JSON object as in this example: ```json { - "user_id": "3", - "number_of_items": "5", - "total_amount": "180" + "user_id": "3", + "number_of_items": "5", + "total_amount": "180" } - ``` It will parse the message and create a new entry in the `orders_db` database. @@ -154,9 +155,9 @@ An example of POST request to ```json { - "user_id": "3", - "number_of_items": "5", - "total_amount": "180" + "user_id": "3", + "number_of_items": "5", + "total_amount": "180" } ``` @@ -246,7 +247,7 @@ Additionally, PM2 provides a number of features for managing multiple applications, such as load balancing and automatic restarts. In our situation we will use it mainly to test resilience for messages sent to -the Billing API when the API is not up and running. +the Billing API when the API is not up and running. After entering in your VM via SSH you may run the following commands: @@ -282,21 +283,21 @@ a common way to structure this kind of projects that may help you: ├── srcs │ ├── api-gateway │ │ ├── app -│ │ │ ├── __init__.py +│ │ │ ├── __init__.py │ │ │ └── ... // Other python files │ │ ├── requirements.txt │ │ └── server.js │ ├── billing-app │ │ ├── app -│ │ │ ├── __init__.py +│ │ │ ├── __init__.py │ │ │ └── ... // Other python files │ │ ├── requirements.txt │ │ └── server.js │ └── inventory-app │ │ ├── app -│ │ │ ├── __init__.py +│ │ │ ├── __init__.py │ │ │ └── ... // Other python files -│ ├── requirements.txt +│ ├── requirements.txt │ └── server.py └── Vagrantfile ```