-
Notifications
You must be signed in to change notification settings - Fork 35
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
Consider per-suite pre & post executables #297
Comments
I would definitely prefer something explicit; anything else invites debugging headaches. However, I don't fully understand your explanation of the behavior there. |
me too, just listing the other option for completeness The behavior: Given something like the following two yaml files: a.yaml executors:
- start: starter.sh
- end: ender.sh
tests:
- name: get the thing
GET: /thing b.yaml tests:
- name: get the thing
GET: /thing and When Then the tests would run. Then Other cleanups might be removing items from a database. All the sorts of things one might do in a fixture. When |
Ah, gotcha - so effectively,
|
The design and names need some work (I agree that before after is better), but the main question is the principle useful? My thinking is that while there will be some awkwardness and requirement on the "executors" to sometimes be clever, it's no more than one would need otherwise if scripting gabbi-run into something with before and after handling, with benefit of more easily being per suite. |
If this doesn't save us the usual awkwardness (which I agree would be tricky to achieve), how is this better than just using a shell script ( |
Also, in a CI situation, there's some usefulness to being able to have/see the before and after right next to the gabbits. I dunno, at this stage it is just an idea that came to me in the shower, so I thought I would try to tease it out. |
You've convinced me: I do believe this could be useful. (Despite my questions, I didn't need much convincing in the first place.) |
Like fixtures, but a call to an external executable, for when gabbi-run is being used.
This could be explicit, by putting something in the yaml file, or implicit off the name of the yaml file. That is:
foo.yaml
foo-start
andfoo-end
exist in the same dir and are executableeither way, when the start is called gabbi should save, as a list, the line separated stdout, if any, it produced
and provide that as args (or stdin?) to foo-end
this would allow passing things like pids of started stuff
/cc @FND for sanity check
The text was updated successfully, but these errors were encountered: