Flux alert testing

Hi all, I followed this git issue: State of Flux-native unit testing? · Issue #3054 · influxdata/flux · GitHub and was able to set up a series of tests for my alerts. A couple questions came up when I was setting these flux tests up:

  1. As mentioned in the git issue about, no text is written to stdout when any “package” lines are at the top of the file. Is this expected?
  2. Is there a way to capture the stdout text in flux. I plan to run my tests each morning to make sure our monitoring is working properly and want to store the output of the tests in some format that I can query/refernce in the future - csv, postgres db, etc…

Hello @gtl,

  1. no I don’t believe that’s expected. I haven’t had trouble running my test flux scripts in the past with package lines included.
  2. I don’t think so. Not with Flux. Maybe you could use the execd input plugin to run your test and then use the file input plugin to write stdout to influxdb?