generated from VilledeMontreal/repository-template
-
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.
feat: target acceptation for load testing
Signed-off-by: Matthieu <[email protected]>
- Loading branch information
Showing
12 changed files
with
90 additions
and
57 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
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
2 changes: 1 addition & 1 deletion
2
le-taxi-api-tests/src/taxis/loadTests/test-realtime-booking-no-destination.yaml
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
6 changes: 3 additions & 3 deletions
6
le-taxi-api-tests/src/taxis/loadTests/test-realtime-booking.yaml
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,17 +1,17 @@ | ||
config: | ||
target: 'https://taximtldev.accept.ville.montreal.qc.ca' | ||
processor: './test-taxi-grid.js' | ||
target: "https://taximtl.accept.ville.montreal.qc.ca" | ||
processor: "./test-taxi-grid.js" | ||
http: | ||
pool: 30 | ||
phases: | ||
- name: '300 GET taxis/grid - used by UI' | ||
- name: "300 GET taxis/grid - used by UI" | ||
arrivalRate: 1 | ||
duration: 300 | ||
scenarios: | ||
- name: 'taxi grid' | ||
- name: "taxi grid" | ||
flow: | ||
- function: 'beforeFlow' | ||
- function: "beforeFlow" | ||
- get: | ||
url: '/api/legacy-web/taxis/grid?page=0&pagesize=10' | ||
url: "/api/legacy-web/taxis/grid?page=0&pagesize=10" | ||
headers: | ||
X-API-KEY: '{{apikey}}' | ||
X-API-KEY: "{{apikey}}" |
12 changes: 6 additions & 6 deletions
12
le-taxi-api-tests/src/taxis/loadTests/test-trigger-many-bad-requests-alert.yaml
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,18 +1,18 @@ | ||
config: | ||
target: 'https://taximtldev.accept.ville.montreal.qc.ca' | ||
processor: './generatePayload.js' | ||
target: "https://taximtl.accept.ville.montreal.qc.ca" | ||
processor: "./generatePayload.js" | ||
http: | ||
pool: 20 | ||
timeout: 5 | ||
phases: | ||
- name: 'trigger many bad requests (4xx)' | ||
- name: "trigger many bad requests (4xx)" | ||
arrivalRate: 50 | ||
duration: 300 | ||
before: | ||
flow: | ||
- log: 'WARNING: to trigger alerts you need to make sure they are available on DEV. Check kubernetes-installed-apps repository first.' | ||
- log: "WARNING: to trigger alerts you need to make sure they are available on DEV. Check kubernetes-installed-apps repository first." | ||
scenarios: | ||
- name: 'error 400' | ||
- name: "error 400" | ||
flow: | ||
- get: | ||
url: '/api/fakes/fake-error-400' | ||
url: "/api/fakes/fake-error-400" |
12 changes: 6 additions & 6 deletions
12
le-taxi-api-tests/src/taxis/loadTests/test-trigger-many-errors-alert.yaml
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,18 +1,18 @@ | ||
config: | ||
target: 'https://taximtldev.accept.ville.montreal.qc.ca' | ||
processor: './generatePayload.js' | ||
target: "https://taximtl.accept.ville.montreal.qc.ca" | ||
processor: "./generatePayload.js" | ||
http: | ||
pool: 20 | ||
timeout: 5 | ||
phases: | ||
- name: 'trigger many errors (5xx)' | ||
- name: "trigger many errors (5xx)" | ||
arrivalRate: 50 | ||
duration: 300 | ||
before: | ||
flow: | ||
- log: 'WARNING: to trigger alerts you need to make sure they are available on DEV. Check kubernetes-installed-apps repository first.' | ||
- log: "WARNING: to trigger alerts you need to make sure they are available on DEV. Check kubernetes-installed-apps repository first." | ||
scenarios: | ||
- name: 'error 500' | ||
- name: "error 500" | ||
flow: | ||
- get: | ||
url: '/api/fakes/fake-error-500' | ||
url: "/api/fakes/fake-error-500" |
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,23 +1,52 @@ | ||
truncate table driver, public."ADS", vehicle, vehicle_description, taxi | ||
|
||
delete from roles_users | ||
where user_id in ( | ||
select id | ||
from public.user | ||
where email like 'zApiTest%' | ||
) | ||
); | ||
|
||
delete from customer | ||
where added_by in ( | ||
select id | ||
from public.user | ||
where email like 'zApiTest%' | ||
) | ||
|
||
); | ||
|
||
-- truncate if you don't want to keep existing data otherwise use the deletes | ||
-- truncate table driver, public."ADS", vehicle, vehicle_description, taxi | ||
|
||
-- start of deletes | ||
delete | ||
from public."taxi" t | ||
using public.user u | ||
where u.id = t.added_by | ||
and u.email like 'zApiTest%'; | ||
|
||
delete | ||
from public."vehicle_description" vd | ||
using public.user u | ||
where u.id = vd.added_by | ||
and u.email like 'zApiTest%'; | ||
|
||
delete | ||
from public."vehicle" v | ||
using public.user u | ||
where u.id = v.added_by_user | ||
and u.email like 'zApiTest%'; | ||
|
||
delete | ||
from public."driver" d | ||
using public.user u | ||
where u.id = d.added_by | ||
and u.email like 'zApiTest%'; | ||
|
||
delete | ||
from public."ADS" ads | ||
using public.user u | ||
where u.id = ads.added_by | ||
and u.email like 'zApiTest%'; | ||
-- end of deletes | ||
|
||
-- then delete the tests users | ||
delete from public.user | ||
where email like 'zApiTest%' | ||
|
||
|
||
|
||
|
||
|
||
where email like 'zApiTest%'; |