Refactor e2e tests to use the service ClusterIP

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-02-22 11:03:42 -03:00
parent f04361cc06
commit 5e249d3366
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
80 changed files with 777 additions and 706 deletions

View file

@ -124,7 +124,7 @@ func WaitForPodsReady(kubeClientSet kubernetes.Interface, timeout time.Duration,
return wait.Poll(2*time.Second, timeout, func() (bool, error) {
pl, err := kubeClientSet.CoreV1().Pods(namespace).List(opts)
if err != nil {
return false, err
return false, nil
}
r := 0
@ -150,11 +150,11 @@ func WaitForEndpoints(kubeClientSet kubernetes.Interface, timeout time.Duration,
return wait.Poll(2*time.Second, timeout, func() (bool, error) {
endpoint, err := kubeClientSet.CoreV1().Endpoints(ns).Get(name, metav1.GetOptions{})
if k8sErrors.IsNotFound(err) {
return false, err
return false, nil
}
Expect(err).NotTo(HaveOccurred())
if len(endpoint.Subsets) == 0 || len(endpoint.Subsets[0].Addresses) == 0 {
return false, err
return false, nil
}
r := 0
@ -191,7 +191,7 @@ func getIngressNGINXPod(ns string, kubeClientSet kubernetes.Interface) (*core.Po
LabelSelector: "app.kubernetes.io/name=ingress-nginx",
})
if err != nil {
return nil, err
return nil, nil
}
if len(l.Items) == 0 {