-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fix TAP output with multiple RuntimeInsideValidate #658
Fix TAP output with multiple RuntimeInsideValidate #658
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. (but I'm not maintainer)
Tested it, and it works.
See below for minor things:
docs/devel_guidelines.md
Outdated
|
||
#### Using `util.RuntimeInsideValidate` and encapsulation | ||
|
||
Similar to previously but the test consumes the output from `runtimetest` and re-emit a single TAP result for the container run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it more precise to write Similar to the passthrough variant but...
?
docs/devel_guidelines.md
Outdated
Example: | ||
```go | ||
err = util.RuntimeOutsideValidate(g, t, func(config *rspec.Spec, t *tap.T, state *rspec.State) error { | ||
err := test_foo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: s/test_foo/testFoo/
for the idiomatic Go coding style?
Signed-off-by: Alban Crequy <alban@kinvolk.io>
Signed-off-by: Alban Crequy <alban@kinvolk.io>
Signed-off-by: Alban Crequy <alban@kinvolk.io>
82f12dd
to
069db1a
Compare
Thanks for the review. Fixed & rebased. |
👍 |
Getting proper TAP output with
RuntimeInsideValidate
was not possible when running several containers in a single test file. With this PR, we can optionally pass the TAP object inRuntimeInsideValidate
and thenruntimetest
in the container will no longer directly print its own TAP output on stdout but it will be intercepted and encapsulated in the outer TAP output.Signed-off-by: Alban Crequy alban@kinvolk.io