]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: make sd-journal-gatewayd tests even more debug-able 32228/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 11 Apr 2024 12:24:42 +0000 (14:24 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 11 Apr 2024 12:42:45 +0000 (14:42 +0200)
commit6d13aacaacc660fa38cca973037203a8d42b5da1
tree368f4643eac6ab565b031006462b43f669626287
parent8d9cdb31f7cc41bb2252be70a2410030551aabde
test: make sd-journal-gatewayd tests even more debug-able

Unfortunately bfd30e8af6 is not enough and the test fails, that still
occasionally occur, don't provide enough information to see what's
wrong. Let's rework the test a little to improve this, namely:

  - redirect curl's output into a temporary file instead of piping it
    directly into the "check" expression; that way we can simply dump
    the temporary file when the test fails, providing potentially
    crucial information. We don't want to always dump everything to
    stdout, as some of the tests request an entire system journal (note
    that shell redirection instead of `curl -o file` is used
    intentionally, so the output file is always nuked first)
  - by dropping the pipes in curl commands we can re-enable pipefail
  - also, split some very long commands to multiple lines to (slightly)
    improve readability

Follow-up for bfd30e8af64a0d39ad110258dca69be919f6df34.
test/units/testsuite-04.journal-gatewayd.sh