-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix 1971 #1972
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
Fix 1971 #1972
Conversation
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
|
|
||
| @Test | ||
| @Override | ||
| void testWithoutSubsetsOrEndpoints() { |
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.
both here and in k8s-native, I've added two tests to cover the cases that the bug describes
| List<EndpointNameAndNamespace> generateState(List<EndpointSlice> endpointSlices) { | ||
| Stream<ObjectReference> references = endpointSlices.stream() | ||
| .map(EndpointSlice::getEndpoints) | ||
| .filter(Objects::nonNull) |
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.
the actual fix
| * V1EndpointSubset::getAddresses and V1EndpointSubset::getPorts (each is a List) | ||
| * </pre> | ||
| */ | ||
| List<EndpointNameAndNamespace> generateState(List<V1Endpoints> endpoints) { |
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.
extract as a separate package-private method to be able to test it
|
@ryanjbaxter ready for review. thank you |
No description provided.