nix: add loadtest with unique JWTs
This loadtests the jwt decoding logic. For this it adds an optional `-k`(kind) parameter to `postgrest-loadtest` and `postgrest-loadtest-against`. Old kind (default): ``` postgrest-loadtest -k mixed postgrest-loadtest-against -k mixed ``` New kind: ``` postgrest-loadtest -k jwt postgrest-loadtest-against -k jwt ``` Internally it uses a dynamically generated targets file using python which looks like: ``` GET http://postgrest/authors_only Authorization: Bearer <jwt> GET http://postgrest/authors_only Authorization: Bearer <another-jwt> ... ``` Then this is used to run vegeta with the `-lazy` option.
This commit is contained in:
committed by
Steve Chavez
parent
a37ec1e1a5
commit
608f7ca45a
@@ -126,11 +126,15 @@ jobs:
|
||||
id: get-latest-tag
|
||||
with:
|
||||
prefix: v
|
||||
- name: Run loadtest
|
||||
- name: Run loadtest (mixed)
|
||||
run: |
|
||||
postgrest-loadtest-against main ${{ steps.get-latest-tag.outputs.tag }}
|
||||
postgrest-loadtest-report >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Run loadtest (jwt)
|
||||
# TODO generate a report for this https://github.com/PostgREST/postgrest/issues/4022
|
||||
run: |
|
||||
postgrest-loadtest-against -k jwt main ${{ steps.get-latest-tag.outputs.tag }}
|
||||
|
||||
flake:
|
||||
strategy:
|
||||
|
||||
Reference in New Issue
Block a user