mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
e2e tests must consider duplicate endpoint slices
In some cases the EndpointSlice controller will create more EndpointSlices than necessary resulting in some duplication. This is valid and tests should only fail here if less EndpointSlices than expected are added.
This commit is contained in:
parent
c0d0baf08f
commit
beef6ae512
@ -521,7 +521,11 @@ func hasMatchingEndpointSlices(cs clientset.Interface, ns, svcName string, numEn
|
||||
for _, endpointSlice := range esList.Items {
|
||||
actualNumEndpoints += len(endpointSlice.Endpoints)
|
||||
}
|
||||
if actualNumEndpoints != numEndpoints {
|
||||
// In some cases the EndpointSlice controller will create more
|
||||
// EndpointSlices than necessary resulting in some duplication. This is
|
||||
// valid and tests should only fail here if less EndpointSlices than
|
||||
// expected are added.
|
||||
if actualNumEndpoints < numEndpoints {
|
||||
framework.Logf("EndpointSlices for %s/%s Service have %d/%d endpoints", ns, svcName, actualNumEndpoints, numEndpoints)
|
||||
return esList.Items, false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user