func (j *TestJig) checkClusterIPServiceReachability(svc *v1.Service, pod *v1.Pod) error {
	clusterIP := svc.Spec.ClusterIP
	servicePorts := svc.Spec.Ports

	err := j.waitForAvailableEndpoint(ServiceEndpointsTimeout)
	if err != nil {
		return err
	}

	for _, servicePort := range servicePorts {
		err = testReachabilityOverServiceName(svc.Name, servicePort, pod)
		if err != nil {
			return err
		}
		err = testReachabilityOverClusterIP(clusterIP, servicePort, pod)
		if err != nil {
			return err
		}
	}
	return nil
}
// checkClusterIPServiceReachability ensures that service of type ClusterIP is reachable over
// - ServiceName:ServicePort, ClusterIP:ServicePort
checkClusterIPServiceReachability ensures that service of type ClusterIP is reachable over
- ServiceName:ServicePort, ClusterIP:ServicePort
// checkClusterIPServiceReachability ensures that service of type ClusterIP is reachable over // - ServiceName : ServicePort ClusterIP : ServicePort
func (j *TestJig) checkClusterIPServiceReachability(svc *v1.Service, pod *v1.Pod) error {
	clusterIP := svc.Spec.ClusterIP
	servicePorts := svc.Spec.Ports
	err := j.waitForAvailableEndpoint(ServiceEndpointsTimeout)
	if err != nil {
		return err
	}
	for _, servicePort := range servicePorts {
		err = testReachabilityOverServiceName(svc.Name, servicePort, pod)
		if err != nil {
			return err
		}
		err = testReachabilityOverClusterIP(clusterIP, servicePort, pod)
		if err != nil {
			return err
		}
	}
	return nil
}
func ( j * TestJig ) checkClusterIPServiceReachability ( svc * v1 . Service , pod * v1 . Pod ) error { clusterIP := svc . Spec . ClusterIP servicePorts := svc . Spec . Ports err := j . waitForAvailableEndpoint ( ServiceEndpointsTimeout ) if err != nil { return err } for _ , servicePort := range servicePorts { err = testReachabilityOverServiceName ( svc . Name , servicePort , pod ) if err != nil { return err } err = testReachabilityOverClusterIP ( clusterIP , servicePort , pod ) if err != nil { return err } } return nil }
checkClusterIPServiceReachability ensures that service of type ClusterIP is reachable over
 ServiceName:ServicePort, ClusterIP:ServicePort
checkClusterIPServiceReachability ensures that service of type ClusterIP is reachable over ServiceName : ServicePort ClusterIP : ServicePort