Remove hard-coded names from e2e test and use local docker dependencies (#4502)
This commit is contained in:
parent
c7d2444cf4
commit
c85450c1e7
68 changed files with 894 additions and 293 deletions
|
|
@ -122,7 +122,7 @@ func (f *Framework) EnsureDeployment(deployment *appsv1.Deployment) (*appsv1.Dep
|
|||
|
||||
// WaitForPodsReady waits for a given amount of time until a group of Pods is running in the given namespace.
|
||||
func WaitForPodsReady(kubeClientSet kubernetes.Interface, timeout time.Duration, expectedReplicas int, namespace string, opts metav1.ListOptions) error {
|
||||
return wait.Poll(2*time.Second, timeout, func() (bool, error) {
|
||||
return wait.Poll(Poll, timeout, func() (bool, error) {
|
||||
pl, err := kubeClientSet.CoreV1().Pods(namespace).List(opts)
|
||||
if err != nil {
|
||||
return false, nil
|
||||
|
|
@ -145,7 +145,7 @@ func WaitForPodsReady(kubeClientSet kubernetes.Interface, timeout time.Duration,
|
|||
|
||||
// WaitForPodsDeleted waits for a given amount of time until a group of Pods are deleted in the given namespace.
|
||||
func WaitForPodsDeleted(kubeClientSet kubernetes.Interface, timeout time.Duration, namespace string, opts metav1.ListOptions) error {
|
||||
return wait.Poll(2*time.Second, timeout, func() (bool, error) {
|
||||
return wait.Poll(Poll, timeout, func() (bool, error) {
|
||||
pl, err := kubeClientSet.CoreV1().Pods(namespace).List(opts)
|
||||
if err != nil {
|
||||
return false, nil
|
||||
|
|
@ -163,12 +163,15 @@ func WaitForEndpoints(kubeClientSet kubernetes.Interface, timeout time.Duration,
|
|||
if expectedEndpoints == 0 {
|
||||
return nil
|
||||
}
|
||||
return wait.Poll(2*time.Second, timeout, func() (bool, error) {
|
||||
|
||||
return wait.Poll(Poll, timeout, func() (bool, error) {
|
||||
endpoint, err := kubeClientSet.CoreV1().Endpoints(ns).Get(name, metav1.GetOptions{})
|
||||
if k8sErrors.IsNotFound(err) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
if len(endpoint.Subsets) == 0 || len(endpoint.Subsets[0].Addresses) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue