Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users would like to be able to execute commands, collect log
information, grep for errors in output and other actions when a test
assertion fails.
For instance, if an application is deployed using Kubernetes and network
connectivity doesn't work for the application, the test author might
want to call kubectl logs in the event of a test failure.
Another example might be if you wanted to grep a log file in the event
that no connectivity on a particular IP:PORT combination could be made
you might do this:
The grep ERROR /var/log/myapp.log command will only be executed if there
is no connectivity to $HOST:$PORT and the results of that grep will be
directed to the test's output. You can use the gdt.WithDebug() function
to configure additional io.Writers to direct this output to.
This patch adds support for the exec plugin's
on.fail
field, hopefullyin a way that is extensible for other plugins to use as an example (and
possible embed the
plugin/exec.Action
struct).Addresses Issue #12