-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add routing stategy conflict integration test #699
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #699 +/- ##
==========================================
+ Coverage 80.20% 83.01% +2.80%
==========================================
Files 64 76 +12
Lines 4492 5793 +1301
==========================================
+ Hits 3603 4809 +1206
- Misses 600 649 +49
- Partials 289 335 +46
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.
Test seems fine. Some thoughts, but don't have to block:
- It might be good to document the test a bit more, it's on the more complex side and won't be immediately obvious looking at it, especially in a few weeks, what it is testing.
- I'd avoid using https listeners unless you are testing https (Doens't really make any difference since we are mocking the gateway status anyway, just looks like it's important to the test when i see it)
- I'd avoid using
multicluster.MultiClusterIPAddressType
unless you are writing a test to explicitly test that. Most of our tests now should just use the normal gateway status since that is what we now use in all deployment cases (distributed dns) with the OCM integration being lower priority for now.
})), | ||
) | ||
// long timeout in a separate assertion - this avoids the test from being flaky: sometimes policy needs more time to become enforced | ||
}, TestTimeoutLong, TestRetryIntervalMedium).Should(Succeed()) |
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.
How long do we expect this to take? Does Enforced being true only get set once the record is ready?
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.
Yes, Enforced
can only be set once it is Ready
. On my local runs from 2-3 to 12 seconds (that section). The test itself usually around a minute
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.
Updated test:
- added more comments
- using the HTTP listener
- using casual IP address
Adds a new integration test to ensure we deal correctly with the situation when two policies will have conflicting strategies for the same host