kapacitor-unit icon indicating copy to clipboard operation
kapacitor-unit copied to clipboard

Execute all tests found within the tests directory

Open vhartikainen opened this issue 6 years ago • 3 comments

It would be helpful to provide just the tests directory on command line. Then the tool would iterate over all tests it finds and runs the tests.

e.g.

scripts
+- scripts1
     +- script1.tick
+- scripts2
     +- script2.tick
tests
+- test1.yaml
+- test2.yaml

And running: kapacitor-unit --dir scripts --tests tests/

The tool would then execute all tests it finds from the directory

vhartikainen avatar May 30 '18 12:05 vhartikainen

Yep, this sounds like a good improvement! Would you push the ball forward @vhartikainen ? 😃

The cli already parses all the tick scripts in a directory when input in --dir script. Maybe that code can be reused?

gpestana avatar Jun 04 '18 14:06 gpestana

A big maybe from me 😏 Never written a single line of Go, but I'm willing to give it a go.

No promises on estimate when to be finished though 😄

vhartikainen avatar Jun 05 '18 08:06 vhartikainen

Pr #33 accomplishes this. It checks the --tests config to see if it's a dir or a yaml file before parsing so it's backwards compatible.

vlaurenzano avatar Jun 27 '19 17:06 vlaurenzano