Commit bbf15d5c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #44191 from msau42/pv-upgrade-fix

Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072) Fix pv upgrade test failure **What this PR does / why we need it**: 2 changes were made that broke the pv upgrade test: 1. MakePod() was changed so that the volume mount point is at /mnt/volume<n> instead of /mnt. This change updates the path that the pod writes to. 2. The MakePod() call was changed to CreatePod(), which creates the pod and expects a long running pod. But the upgrade test uses a short running pod, and the call to TestContainerOutput() will also create the pod. This changes it back to MakePod() **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #44168 **Special notes for your reviewer**: **Release note**: NONE
parents 27cf62ac 93e3fe8e
......@@ -33,7 +33,7 @@ type PersistentVolumeUpgradeTest struct {
func (PersistentVolumeUpgradeTest) Name() string { return "persistent-volume-upgrade" }
const (
pvTestFile string = "/mnt/pv_upgrade_test"
pvTestFile string = "/mnt/volume1/pv_upgrade_test"
pvTestData string = "keep it pv"
pvWriteCmd string = "echo \"" + pvTestData + "\" > " + pvTestFile
pvReadCmd string = "cat " + pvTestFile
......@@ -99,7 +99,7 @@ func (t *PersistentVolumeUpgradeTest) Teardown(f *framework.Framework) {
// testPod creates a pod that consumes a pv and prints it out. The output is then verified.
func (t *PersistentVolumeUpgradeTest) testPod(f *framework.Framework, cmd string) {
pod := framework.CreatePod(f.ClientSet, f.Namespace.Name, []*v1.PersistentVolumeClaim{t.pvc}, false, cmd)
pod := framework.MakePod(f.Namespace.Name, []*v1.PersistentVolumeClaim{t.pvc}, false, cmd)
expectedOutput := []string{pvTestData}
f.TestContainerOutput("pod consumes pv", pod, 0, expectedOutput)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment