Fix TAP output with multiple RuntimeInsideValidate#658
Merged
zhouhao3 merged 3 commits intoopencontainers:masterfrom Aug 21, 2018
Merged
Fix TAP output with multiple RuntimeInsideValidate#658zhouhao3 merged 3 commits intoopencontainers:masterfrom
zhouhao3 merged 3 commits intoopencontainers:masterfrom
Conversation
dongsupark
reviewed
Aug 13, 2018
dongsupark
left a comment
There was a problem hiding this comment.
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.
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.
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
Contributor
Author
|
Thanks for the review. Fixed & rebased. |
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Getting proper TAP output with
RuntimeInsideValidatewas not possible when running several containers in a single test file. With this PR, we can optionally pass the TAP object inRuntimeInsideValidateand thenruntimetestin 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