Merge branch 'master' of ssh://wopr.rodax-software.com:30001/lqdvi/app2-api

This commit is contained in:
David Arranz 2020-09-08 16:45:53 +02:00
commit 00492d0ed7
3 changed files with 20 additions and 3 deletions

17
artillery_test.yml Normal file
View File

@ -0,0 +1,17 @@
config:
target: 'https://apiapp2.loquedeverdadimporta.org'
phases:
- duration: 120
arrivalRate: 10
rampTo: 50
name: "Warm up the application"
- duration: 600
arrivalRate: 50
name: "Sustained max load"
defaults:
headers:
x-access-token: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImVjZjdkZGEyLTI1OGMtNDU4ZC1hNDFmLWRlMDdhOWNmYjZlYiIsImVtYWlsIjoiaW5mb0Byb2RheC1zb2Z0d2FyZS5jb20iLCJpYXQiOjE1NjY4MzU2MjgsImV4cCI6MTU5ODM3MTYyOCwiYXVkIjoiaHR0czovL3d3dy5sb3F1ZWRldmVyZGFkaW1wb3J0YS5vcmciLCJpc3MiOiJGdW5kYWNpw7NuIExRRFZJIiwic3ViIjoiaW5mb0Bsb3F1ZWRldmVyZGFkaW1wb3J0YS5vcmcifQ.epiDTYgr8YJPG1jdDkt7CkZ83iNZaLwXySy6RqVk5pw6O743dDWyIMQ1gCJ0niiF8gMslG-1mTyuF8Zs4EWWxQ'
scenarios:
- flow:
- get:
url: "/api/v2/events/ed163912-da3a-405d-914a-117d2e9f80e3"

View File

@ -273,4 +273,4 @@ module.exports = {
citiesComposer, citiesComposer,
locationComposer, locationComposer,
usersIdsComposer, usersIdsComposer,
} }

View File

@ -55,7 +55,7 @@ routes.get('/events/next',
invalidFields: generalInvalidFields invalidFields: generalInvalidFields
}), }),
PaginateMiddleware.middleware(), PaginateMiddleware.middleware(),
SortMiddleware.middleware({ default: "init_date" }), SortMiddleware.middleware({ default: "name" }),
(req, res, next) => { (req, res, next) => {
// console.log(moment().add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss')); // console.log(moment().add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss'));
return eventController.find({ return eventController.find({
@ -518,4 +518,4 @@ routes.put('/live/questions/:id',
); );
module.exports = routes; module.exports = routes;