Drop gotest.tools#6762
Merged
estesp merged 2 commits intocontainerd:mainfrom Apr 2, 2022
Merged
Conversation
|
Build succeeded.
|
samuelkarp
approved these changes
Apr 1, 2022
Member
samuelkarp
left a comment
There was a problem hiding this comment.
LGTM. I left suggestions where I think the use of Testify could be more idiomatic, but I don't think any of those should be blocking.
| err = tryLock("testref") | ||
| assert.ErrorContains(t, err, "ref testref locked for ") | ||
| require.NotNil(t, err) | ||
| assert.Contains(t, err.Error(), "ref testref locked for ") |
Member
There was a problem hiding this comment.
Suggested change
| assert.Contains(t, err.Error(), "ref testref locked for ") | |
| assert.ErrorContains(t, err, "ref testref locked for ") |
| // We test the default setting which is lazy init is disabled | ||
| err := mkfs(ctx, "ext4", "nodiscard,lazy_itable_init=0,lazy_journal_init=0", "") | ||
| assert.ErrorContains(t, err, `mkfs.ext4 couldn't initialize ""`) | ||
| assert.Contains(t, err.Error(), `mkfs.ext4 couldn't initialize ""`) |
Member
There was a problem hiding this comment.
Suggested change
| assert.Contains(t, err.Error(), `mkfs.ext4 couldn't initialize ""`) | |
| assert.ErrorContains(t, err, `mkfs.ext4 couldn't initialize ""`) |
Comment on lines
+274
to
+277
| assert.NotNil(t, err) | ||
| if err != nil { | ||
| assert.Contains(t, err.Error(), "remove") | ||
| } |
Member
There was a problem hiding this comment.
I think this can be simplified
Suggested change
| assert.NotNil(t, err) | |
| if err != nil { | |
| assert.Contains(t, err.Error(), "remove") | |
| } | |
| assert.ErrorContains(t, err, "remove") |
Member
Author
|
I've addressed the majority of suggestions. |
Signed-off-by: Maksym Pavlenko <[email protected]>
Signed-off-by: Maksym Pavlenko <[email protected]>
|
Build succeeded.
|
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.
Currently we rely on two different helper libraries for testing:
gotest.tools/v3/assertgithub.com/stretchr/testify/assertBoth offer more or less same set of APIs, so there is no reason to keep both.
Looks like
testifygot better adoption accross containerd's codebase.So this PR migrates tests to
testifyand dropsgotest.tools/v3/assertdependency.