nix: more explicit logging in load test
* Write vegeta output to file explicitly. The previous version using `tee` captured the standard output of the `withPgrst` helper, too, causing weird errors when those had unexpected output. * Log and fail the postgrest build explicitly. In situations such as changing nix dependencies, the `cabal build` run could fail, but this wasn't visible in CI. With these changes, the load test now fails with a nice error message when the build fails.
This commit is contained in:
@@ -60,9 +60,8 @@ let
|
||||
# shellcheck disable=SC2145
|
||||
${withTools.withPg} --fixtures "$_arg_testdir"/fixtures.sql \
|
||||
${withTools.withPgrst} \
|
||||
sh -c "cd \"$_arg_testdir\" && ${runner} -targets targets.http \"''${_arg_leftovers[@]}\"" \
|
||||
| tee "$_arg_output" \
|
||||
| ${vegeta}/bin/vegeta report -type=text
|
||||
sh -c "cd \"$_arg_testdir\" && ${runner} -targets targets.http -output \"$_arg_output\" \"''${_arg_leftovers[@]}\""
|
||||
${vegeta}/bin/vegeta report -type=text "$_arg_output"
|
||||
'';
|
||||
|
||||
loadtestAgainst =
|
||||
|
||||
Reference in New Issue
Block a user