From 724fb733d12be4a40421a752fabe55e0f2e2587c Mon Sep 17 00:00:00 2001 From: Kevin Taylor Date: Tue, 4 Feb 2020 19:02:08 +0000 Subject: [PATCH] Change HostPath to EmptyDir for VolumeSubpathEnvExpansion e2e tests --- test/e2e/common/expansion.go | 42 ++++++++---------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/test/e2e/common/expansion.go b/test/e2e/common/expansion.go index 2c03a9b2ad8..4a042fa3568 100644 --- a/test/e2e/common/expansion.go +++ b/test/e2e/common/expansion.go @@ -184,7 +184,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { SubPathExpr: "$(POD_NAME)", }, { - Name: "workdir2", + Name: "workdir1", MountPath: "/testcontainer", }, }, @@ -195,13 +195,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { { Name: "workdir1", VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, - }, - }, - { - Name: "workdir2", - VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, + EmptyDir: &v1.EmptyDirVolumeSource{}, }, }, }, @@ -353,7 +347,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { SubPathExpr: "$(ANNOTATION)/$(POD_NAME)", }, { - Name: "workdir2", + Name: "workdir1", MountPath: "/volume_mount", }, }, @@ -363,13 +357,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { { Name: "workdir1", VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, - }, - }, - { - Name: "workdir2", - VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, + EmptyDir: &v1.EmptyDirVolumeSource{}, }, }, }, @@ -443,7 +431,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { SubPathExpr: "$(ANNOTATION)/$(POD_NAME)", }, { - Name: "workdir2", + Name: "workdir1", MountPath: "/volume_mount", }, }, @@ -454,13 +442,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { { Name: "workdir1", VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, - }, - }, - { - Name: "workdir2", - VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, + EmptyDir: &v1.EmptyDirVolumeSource{}, }, }, }, @@ -536,7 +518,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { MountPath: "/subpath_mount", }, { - Name: "workdir2", + Name: "workdir1", MountPath: "/volume_mount", }, }, @@ -566,7 +548,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { SubPathExpr: "$(POD_NAME)", }, { - Name: "workdir2", + Name: "workdir1", MountPath: "/volume_mount", }, }, @@ -577,13 +559,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { { Name: "workdir1", VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, - }, - }, - { - Name: "workdir2", - VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: "/tmp"}, + EmptyDir: &v1.EmptyDirVolumeSource{}, }, }, },