mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Remove local PV tests using TestContainerOutput because it doesn't wait for unmount
This commit is contained in:
parent
92210a7d76
commit
ce19dda57a
@ -146,22 +146,6 @@ var _ = SIGDescribe("PersistentVolumes-local [Feature:LocalPersistentVolumes] [S
|
|||||||
cleanupLocalVolume(config, testVol)
|
cleanupLocalVolume(config, testVol)
|
||||||
})
|
})
|
||||||
|
|
||||||
It("should be able to mount and read from the volume using one-command containers", func() {
|
|
||||||
By("Creating a pod to read from the PV")
|
|
||||||
readCmd := createReadCmd(volumeDir, testFile)
|
|
||||||
podSpec := makeLocalPod(config, testVol, readCmd)
|
|
||||||
//testFileContent was written during setupLocalVolume
|
|
||||||
f.TestContainerOutput("pod reads PV", podSpec, 0, []string{testFileContent})
|
|
||||||
})
|
|
||||||
|
|
||||||
It("should be able to mount and write to the volume using one-command containers", func() {
|
|
||||||
By("Creating a pod to write to the PV")
|
|
||||||
writeCmd, readCmd := createWriteAndReadCmds(volumeDir, testFile, testVol.hostDir /*writeTestFileContent*/)
|
|
||||||
writeThenReadCmd := fmt.Sprintf("%s;%s", writeCmd, readCmd)
|
|
||||||
podSpec := makeLocalPod(config, testVol, writeThenReadCmd)
|
|
||||||
f.TestContainerOutput("pod writes to PV", podSpec, 0, []string{testVol.hostDir})
|
|
||||||
})
|
|
||||||
|
|
||||||
It("should be able to mount volume and read from pod1", func() {
|
It("should be able to mount volume and read from pod1", func() {
|
||||||
By("Creating pod1")
|
By("Creating pod1")
|
||||||
pod1, pod1Err := createLocalPod(config, testVol)
|
pod1, pod1Err := createLocalPod(config, testVol)
|
||||||
@ -213,18 +197,6 @@ var _ = SIGDescribe("PersistentVolumes-local [Feature:LocalPersistentVolumes] [S
|
|||||||
AfterEach(func() {
|
AfterEach(func() {
|
||||||
cleanupLocalVolume(config, testVol)
|
cleanupLocalVolume(config, testVol)
|
||||||
})
|
})
|
||||||
|
|
||||||
It("should be able to mount volume, write from pod1, and read from pod2 using one-command containers", func() {
|
|
||||||
By("Creating pod1 to write to the PV")
|
|
||||||
writeCmd, readCmd := createWriteAndReadCmds(volumeDir, testFile, testVol.hostDir /*writeTestFileContent*/)
|
|
||||||
writeThenReadCmd := fmt.Sprintf("%s;%s", writeCmd, readCmd)
|
|
||||||
podSpec1 := makeLocalPod(config, testVol, writeThenReadCmd)
|
|
||||||
f.TestContainerOutput("pod writes to PV", podSpec1, 0, []string{testVol.hostDir})
|
|
||||||
|
|
||||||
By("Creating pod2 to read from the PV")
|
|
||||||
podSpec2 := makeLocalPod(config, testVol, readCmd)
|
|
||||||
f.TestContainerOutput("pod reads PV", podSpec2, 0, []string{testVol.hostDir})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
LocalVolumeTypes := []LocalVolumeType{DirectoryLocalVolumeType, TmpfsLocalVolumeType}
|
LocalVolumeTypes := []LocalVolumeType{DirectoryLocalVolumeType, TmpfsLocalVolumeType}
|
||||||
|
Loading…
Reference in New Issue
Block a user