Move NewAgnhostPod() to e2e/network

because the function is called in e2e/network tests only.
This commit is contained in:
Kenichi Omichi
2020-03-23 23:42:58 +00:00
parent 07a7c4902e
commit 5c77461733
6 changed files with 33 additions and 28 deletions

View File

@@ -155,9 +155,6 @@ var (
// BusyBoxImage is the image URI of BusyBox.
BusyBoxImage = imageutils.GetE2EImage(imageutils.BusyBox)
// AgnHostImage is the image URI of AgnHost
AgnHostImage = imageutils.GetE2EImage(imageutils.Agnhost)
// ProvidersWithSSH are those providers where each node is accessible with SSH
ProvidersWithSSH = []string{"gce", "gke", "aws", "local"}
@@ -1583,25 +1580,6 @@ func DescribeIng(ns string) {
Logf(desc)
}
// NewAgnhostPod returns a pod that uses the agnhost image. The image's binary supports various subcommands
// that behave the same, no matter the underlying OS.
func (f *Framework) NewAgnhostPod(name string, args ...string) *v1.Pod {
return &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "agnhost",
Image: AgnHostImage,
Args: args,
},
},
},
}
}
// CreateEmptyFileOnPod creates empty file at given path on the pod.
// TODO(alejandrox1): move to subpkg pod once kubectl methods have been refactored.
func CreateEmptyFileOnPod(namespace string, podName string, filePath string) error {