-
Notifications
You must be signed in to change notification settings - Fork 805
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
chore: remove duplicate 'GenerateNPods' #1252
Conversation
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1252 +/- ##
==========================================
- Coverage 55.78% 55.09% -0.69%
==========================================
Files 68 81 +13
Lines 4383 4993 +610
==========================================
+ Hits 2445 2751 +306
- Misses 1768 1981 +213
- Partials 170 261 +91
Continue to review full report at Codecov.
|
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.
rest LGTM.
Since we are build test cases, explicitly environment is very important, so using default values is not so good for the situation.
And suggestions for default value: do not apply default value as if value == "" { value = defaultValue }
; using a constructor to setup default value;
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
pkg/utils/generate.go
Outdated
@@ -0,0 +1,111 @@ | |||
// Copyright 2019 Chaos Mesh Authors. |
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.
s/2019/2020/
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.
thx! fixed
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
85c259c
to
e379ad6
Compare
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
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
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
/merge |
/run-all-tests |
Signed-off-by: STRRL <str_ruiling@outlook.com>
Signed-off-by: yiyiyimu wosoyoung@gmail.com
What problem does this PR solve?
There are two
GenerateNPods
exists with little difference, so merge them togetherchaos-mesh/pkg/utils/selector_test.go
Line 592 in 26fe552
chaos-mesh/controllers/test/types.go
Line 128 in 6afb841
What is changed and how does it work?
Add a struct so don't need to type in the arguments not used in certain test.
Checklist
Tests
Side effects
Related changes
Does this PR introduce a user-facing change?