|
45 | 45 | "ARG_OPTIONAL_SINGLE([testdir], [t], [Directory to load tests and fixtures from], [./test/load])" |
46 | 46 | "ARG_OPTIONAL_SINGLE([kind], [k], [Kind of loadtest], [mixed])" |
47 | 47 | "ARG_OPTIONAL_SINGLE([method],, [HTTP method used for the jwt loadtests], [OPTIONS])" |
48 | | - "ARG_TYPE_GROUP_SET([KIND], [KIND], [kind], [mixed,jwt-hs,jwt-hs-cache,jwt-hs-cache-worst,jwt-rsa,jwt-rsa-cache,jwt-rsa-cache-worst])" |
| 48 | + "ARG_TYPE_GROUP_SET([KIND], [KIND], [kind], [mixed,errors,jwt-hs,jwt-hs-cache,jwt-hs-cache-worst,jwt-rsa,jwt-rsa-cache,jwt-rsa-cache-worst])" |
49 | 49 | "ARG_TYPE_GROUP_SET([METHOD], [METHOD], [method], [OPTIONS,GET])" |
50 | 50 | "ARG_OPTIONAL_SINGLE([monitor], [m], [Monitoring file], [./loadtest/result.csv])" |
51 | 51 | "ARG_LEFTOVERS([additional vegeta arguments])" |
@@ -152,11 +152,20 @@ let |
152 | 152 | sh -c "cd \"$_arg_testdir\" && \ |
153 | 153 | ${runner} -targets targets.http -output \"$abs_output\" \"''${_arg_leftovers[@]}\"" |
154 | 154 | ;; |
| 155 | +
|
| 156 | + # here we sleep purposefully to check how much memory does the schema cache consume in the final report |
| 157 | + errors) |
| 158 | + # shellcheck disable=SC2145 |
| 159 | + ${withTools.withPg} -f "$_arg_testdir"/errors.sql \ |
| 160 | + ${withTools.withPgrst} --timeout 2 --sleep 5 -m "$_arg_monitor" \ |
| 161 | + sh -c "cd \"$_arg_testdir\" && \ |
| 162 | + ${runner} -targets errors.http -output \"$abs_output\" \"''${_arg_leftovers[@]}\"" |
| 163 | + ;; |
155 | 164 | esac |
156 | 165 |
|
157 | 166 | ${vegeta}/bin/vegeta report -type=text "$_arg_output" |
158 | 167 |
|
159 | | - if [ "$_arg_kind" != "mixed" ]; then |
| 168 | + if [ "$_arg_kind" != "errors" ]; then |
160 | 169 | # fail in case 401 happened on jwt loadtests |
161 | 170 | unauthorized_count="$(${vegeta}/bin/vegeta report -type=json "$_arg_output" \ |
162 | 171 | | ${jq}/bin/jq -r '.status_codes["401"] // 0')" |
|
0 commit comments