-
Notifications
You must be signed in to change notification settings - Fork 369
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
Make Peer validation more comprehensive #3104
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3104 +/- ##
==========================================
- Coverage 60.83% 52.07% -8.77%
==========================================
Files 295 457 +162
Lines 24892 51603 +26711
==========================================
+ Hits 15142 26870 +11728
- Misses 8095 22485 +14390
- Partials 1655 2248 +593
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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, let's also add E2E test to verify this as well?
5a63daf
to
5865840
Compare
5865840
to
db62f64
Compare
Signed-off-by: wgrayson <[email protected]>
db62f64
to
ba1ed4c
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.
Not specific to this PR, but I feel it's a bit overkill to have so many testInvalidACNPXXXX e2e tests, which could have been tested by unit tests.
@GraysonWu @Dyanngg @antoninbas what you think?
@@ -427,6 +427,46 @@ func testInvalidACNPAppliedToNotSetInAllRules(t *testing.T) { | |||
} | |||
} | |||
|
|||
func testInvalidACNPAppliedToGroupSetWithPodSelector(t *testing.T) { | |||
invalidNpErr := fmt.Errorf("invalid Antrea ClusterNetworkPolicy with appliedTo set group with podSelector") |
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.
maybe we should consider moving some e2e tests to unit tests if they don't require a whole system to validate the code. For example, the illegal inputs that can be validated by calling the validation function directly. This can enable greater converage with a table driven tests and reduce resources spent on e2e tests.
I agree with Quan, we should move these tests to unit tests |
Make sense to me too. I could open another PR to move those tests to unit tests. |
/test-all |
/test-integration |
Fixes #3084
Signed-off-by: wgrayson [email protected]