mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-08 02:15:27 +00:00
Refactored pod-related functions from framework/util.go
This a refactoring of framework/utils.go into framework/pod. Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
This commit is contained in:
committed by
alejandrox1
parent
b3981a2f9a
commit
4969a05327
@@ -40,6 +40,7 @@ import (
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
"k8s.io/kubernetes/pkg/registry/core/service/portallocator"
|
||||
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
|
||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
|
||||
testutils "k8s.io/kubernetes/test/utils"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
@@ -818,7 +819,7 @@ func (j *ServiceTestJig) waitForPodsCreated(namespace string, replicas int) ([]s
|
||||
|
||||
func (j *ServiceTestJig) waitForPodsReady(namespace string, pods []string) error {
|
||||
timeout := 2 * time.Minute
|
||||
if !CheckPodsRunningReady(j.Client, namespace, pods, timeout) {
|
||||
if !e2epod.CheckPodsRunningReady(j.Client, namespace, pods, timeout) {
|
||||
return fmt.Errorf("timeout waiting for %d pods to be ready", len(pods))
|
||||
}
|
||||
return nil
|
||||
@@ -1303,9 +1304,9 @@ func StopServeHostnameService(clientset clientset.Interface, ns, name string) er
|
||||
// in the cluster. Each pod in the service is expected to echo its name. These
|
||||
// names are compared with the given expectedPods list after a sort | uniq.
|
||||
func VerifyServeHostnameServiceUp(c clientset.Interface, ns, host string, expectedPods []string, serviceIP string, servicePort int) error {
|
||||
execPodName := CreateExecPodOrFail(c, ns, "execpod-", nil)
|
||||
execPodName := e2epod.CreateExecPodOrFail(c, ns, "execpod-", nil)
|
||||
defer func() {
|
||||
DeletePodOrFail(c, ns, execPodName)
|
||||
e2epod.DeletePodOrFail(c, ns, execPodName)
|
||||
}()
|
||||
|
||||
// Loop a bunch of times - the proxy is randomized, so we want a good
|
||||
|
||||
Reference in New Issue
Block a user