kubelet: Move TestPortForwardNoSuchContainer() to dockertools package.
Also refactor TestPortForward() to be neutral to container runtime.
This commit is contained in:
@@ -19,6 +19,7 @@ package container
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
@@ -282,6 +283,11 @@ func (p *Pod) FindContainerByName(containerName string) *Container {
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsEmpty returns true if the pod is empty.
|
||||
func (p *Pod) IsEmpty() bool {
|
||||
return reflect.DeepEqual(p, &Pod{})
|
||||
}
|
||||
|
||||
// GetPodFullName returns a name that uniquely identifies a pod.
|
||||
func GetPodFullName(pod *api.Pod) string {
|
||||
// Use underscore as the delimiter because it is not allowed in pod name
|
||||
|
Reference in New Issue
Block a user