-
Notifications
You must be signed in to change notification settings - Fork 950
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
test: make Test_mergeEnvSlice test case happy #2131
test: make Test_mergeEnvSlice test case happy #2131
Conversation
LGTM |
daemon/mgr/container_utils_test.go
Outdated
@@ -206,7 +206,7 @@ func Test_mergeEnvSlice(t *testing.T) { | |||
newEnv: []string{"a=b"}, | |||
oldEnv: []string{"c=d"}, | |||
}, | |||
want: []string{"c=d", "a=b"}, |
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.
I do not advise this way to fix, try to match every value in slice. But consider you have sort before, it also work.
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.
Agree. we should sort the slice before we check.
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.
Agree, updated!
Codecov Report
@@ Coverage Diff @@
## master #2131 +/- ##
=========================================
+ Coverage 64.88% 64.9% +0.01%
=========================================
Files 208 208
Lines 16458 16458
=========================================
+ Hits 10679 10682 +3
+ Misses 4451 4449 -2
+ Partials 1328 1327 -1
|
3885b4b
to
51143a4
Compare
Signed-off-by: Michael Wan <zirenwan@gmail.com>
51143a4
to
7668858
Compare
LGTM |
Signed-off-by: Michael Wan zirenwan@gmail.com
Ⅰ. Describe what this PR did
Now we try TOP(Test-oriented programming), so in order making my test case happy
Just a joke 🤣
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews