Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for providing the script path in yaml #25

Open
vhartikainen opened this issue May 30, 2018 · 2 comments
Open

Support for providing the script path in yaml #25

vhartikainen opened this issue May 30, 2018 · 2 comments

Comments

@vhartikainen
Copy link

It would be helpful to provide the relative tick script path in the configuration YAML if wanted. Such would make it possible to just pass the root tests directory on command line and then have the relative path in config yaml.

e.g.

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

Then having in test1.yaml

...
   task_name: scripts1/script1.tick

And running:
kapacitor-unit --dir scripts --tests tests/test1.yaml

I will add another improvement for just providing a tests directory and then iterating over all test yaml configs in there :)

@gpestana
Copy link
Owner

gpestana commented Jun 4, 2018

The cli is already reading all .tick scripts in a directory and running those.

e.g. kapacitor-unit --dir /some/test_dir [...] will read all .tick scripts under /some/test_dir

@vhartikainen, if I understood your suggestion correctly, this is already implemented? Or am I m issing anything? Thanks!!

@vhartikainen
Copy link
Author

vhartikainen commented Jun 5, 2018

Actually what I was looking for was to:
either
a) gather all .tick scripts recursively from all subdirectories under the given --dir /some directory

or
b) have the tool to understand relative paths in the config file, like when defining --dir scripts and in yaml having that task_name: scripts1/script1.tick for a .tick script that would be located in scripts/scripts1/script1.tick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants