var _ … // expectEndpointsAndSlices verifies that Endpoints and EndpointSlices exist for // a given Service and Namespace with the appropriate attributes set. This is a // relatively complex function as the order of attributes or resources is not // necessarily consistent. It is used as a helper function for the tests above // and takes some shortcuts with the assumption that those test cases will be // the only caller of this function. func expectEndpointsAndSlices(ctx context.Context, cs clientset.Interface, ns string, svc *v1.Service, pods []*v1.Pod, numSubsets, numSlices int, namedPort bool) { … } // deleteEndpointSlices deletes EndpointSlices for the specified Service. func deleteEndpointSlices(ctx context.Context, cs clientset.Interface, ns string, svc *v1.Service) { … } // hasMatchingEndpointSlices returns any EndpointSlices that match the // conditions along with a boolean indicating if all the conditions have been // met. func hasMatchingEndpointSlices(ctx context.Context, cs clientset.Interface, ns, svcName string, numEndpoints, numSlices int) ([]discoveryv1.EndpointSlice, bool) { … } // hasMatchingEndpoints returns any Endpoints that match the conditions along // with a boolean indicating if all the conditions have been met. func hasMatchingEndpoints(ctx context.Context, cs clientset.Interface, ns, svcName string, numIPs, numSubsets int) (*v1.Endpoints, bool) { … } // ensurePodTargetRef ensures that a Pod matches the provided target reference. func ensurePodTargetRef(pod *v1.Pod, targetRef *v1.ObjectReference) { … } // createServiceReportErr creates a Service and reports any associated error. func createServiceReportErr(ctx context.Context, cs clientset.Interface, ns string, service *v1.Service) *v1.Service { … } // endpointSlicesEqual compare if the Endpoint and the EndpointSliceList contains the same endpoints values // as in addresses and ports, considering Ready and Unready addresses func endpointSlicesEqual(endpoints *v1.Endpoints, endpointSliceList *discoveryv1.EndpointSliceList) bool { … }