libcontainer/state_linux_test: Add a testTransitions helper#1703
Merged
crosbymichael merged 1 commit intoopencontainers:masterfrom Feb 2, 2018
Merged
libcontainer/state_linux_test: Add a testTransitions helper#1703crosbymichael merged 1 commit intoopencontainers:masterfrom
crosbymichael merged 1 commit intoopencontainers:masterfrom
Conversation
9589400 to
be16b13
Compare
The helper DRYs up the transition tests and makes it easy to get complete coverage for invalid transitions. I'm also using t.Run() for subtests. Run() is new in Go 1.7 [1], but runc dropped support for 1.6 back in e773f96 (update go version at travis-ci, 2017-02-20, opencontainers#1335). [1]: https://blog.golang.org/subtests Signed-off-by: W. Trevor King <wking@tremily.us>
Member
Member
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.
The helper DRYs up the transition tests and makes it easy to get complete coverage for invalid transitions.
I'm also using
t.Run()for subtests.Run()is new in Go 1.7, but runc dropped support for 1.6 back in e773f96 (#1335).