diff --git a/README.md b/README.md index 385cc9f..705b957 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,14 @@ With this json body (all fields are mandatory): ## Tests +### Thunder tests + Inside the folder thunder-tests you can find the collection with tests for Thunder extension + +### Docker compose + +To use docker compose for tests you can launch into the root folder this command (and force every time the docker build) + +```sh +docker-compose up --build +``` diff --git a/src/routes/status.js b/src/routes/status.js new file mode 100644 index 0000000..39d1d88 --- /dev/null +++ b/src/routes/status.js @@ -0,0 +1,9 @@ +const express = require("express"); +const router = express.Router(); + +router.get("/", (req, res) => { + console.log("status -> ok") + res.status(200).send("ok") +}); + +module.exports = router; diff --git a/src/server.js b/src/server.js index 4b5c511..310073d 100644 --- a/src/server.js +++ b/src/server.js @@ -8,6 +8,7 @@ app.use(express.json()); // Routes const availabilityRouter = require("./routes/availability"); +const statusRouter = require("./routes/status"); app.get("/", (req, res) => { console.log("Here"); @@ -16,6 +17,7 @@ app.get("/", (req, res) => { }); app.use("/availability", availabilityRouter); +app.use("/status", statusRouter); app.listen(PORT, HOST, () => { console.log(`Running on http://${HOST}:${PORT}`); diff --git a/thunder-tests/thunderCollection.json b/thunder-tests/thunderCollection.json index 2df2dd4..177e0c4 100644 --- a/thunder-tests/thunderCollection.json +++ b/thunder-tests/thunderCollection.json @@ -4,6 +4,21 @@ "colName": "app-insights-ambassador", "created": "2023-01-22T18:19:30.158Z", "sortNum": 10000, - "folders": [] + "folders": [ + { + "_id": "963707bc-dd50-4f70-a0a8-f839db6573b4", + "name": "availability", + "containerId": "", + "created": "2023-01-25T19:28:37.659Z", + "sortNum": 10000 + }, + { + "_id": "f92b9fde-a3a6-4314-89cb-a2df0300b8e3", + "name": "status", + "containerId": "", + "created": "2023-01-25T19:28:49.427Z", + "sortNum": 20000 + } + ] } ] \ No newline at end of file diff --git a/thunder-tests/thunderclient.json b/thunder-tests/thunderclient.json index 3915470..74688e8 100644 --- a/thunder-tests/thunderclient.json +++ b/thunder-tests/thunderclient.json @@ -2,13 +2,13 @@ { "_id": "d7827e81-a36f-4054-ade2-36db4c560473", "colId": "c1f6f91b-c276-4f00-b77e-04fa5665212b", - "containerId": "", + "containerId": "963707bc-dd50-4f70-a0a8-f839db6573b4", "name": "add-availability", "url": "http://localhost:3000/availability/add", "method": "POST", "sortNum": 10000, "created": "2023-01-22T18:19:30.160Z", - "modified": "2023-01-22T21:21:20.944Z", + "modified": "2023-01-25T19:28:42.572Z", "headers": [], "params": [], "body": { @@ -21,13 +21,13 @@ { "_id": "1a09c4d0-fe15-49bd-9d1e-c025c2438dce", "colId": "c1f6f91b-c276-4f00-b77e-04fa5665212b", - "containerId": "", + "containerId": "963707bc-dd50-4f70-a0a8-f839db6573b4", "name": "add-availability-success-fail", "url": "http://localhost:3000/availability/add", "method": "POST", - "sortNum": 15000, + "sortNum": 20000, "created": "2023-01-22T18:19:30.161Z", - "modified": "2023-01-22T18:19:30.161Z", + "modified": "2023-01-25T19:28:43.863Z", "headers": [], "params": [], "body": { @@ -40,13 +40,13 @@ { "_id": "8ab87a56-9d16-4f9d-a031-6014770627ce", "colId": "c1f6f91b-c276-4f00-b77e-04fa5665212b", - "containerId": "", + "containerId": "963707bc-dd50-4f70-a0a8-f839db6573b4", "name": "add-availability-wrong-attributes", "url": "http://localhost:3000/availability/add", "method": "POST", - "sortNum": 20000, + "sortNum": 30000, "created": "2023-01-22T18:19:30.162Z", - "modified": "2023-01-22T18:19:30.162Z", + "modified": "2023-01-25T19:28:45.107Z", "headers": [], "params": [], "body": { @@ -55,5 +55,19 @@ "form": [] }, "tests": [] + }, + { + "_id": "d45347df-e727-4a1f-b97e-c82eee37b85f", + "colId": "c1f6f91b-c276-4f00-b77e-04fa5665212b", + "containerId": "f92b9fde-a3a6-4314-89cb-a2df0300b8e3", + "name": "status", + "url": "http://localhost:3000/status", + "method": "GET", + "sortNum": 40000, + "created": "2023-01-25T19:28:59.702Z", + "modified": "2023-01-25T19:29:14.474Z", + "headers": [], + "params": [], + "tests": [] } ] \ No newline at end of file