Merge pull request #53624 from msau42/local-e2e

Automatic merge from submit-queue (batch tested with PRs 53668, 53624, 52639, 53581, 51215). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Local e2e test fixes

**What this PR does / why we need it**:
1. Remove tests using TestContainerOutput because they don't wait for unmount
2. Fix scheduling error test to handle updated event msgs.

@kubernetes/sig-storage-pr-reviews 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53597

**Release note**:

NONE
This commit is contained in:
Kubernetes Submit Queue 2017-10-11 17:00:00 -07:00 committed by GitHub
commit 67e9add546

View File

@ -146,22 +146,6 @@ var _ = SIGDescribe("PersistentVolumes-local [Feature:LocalPersistentVolumes] [S
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() {
By("Creating pod1")
pod1, pod1Err := createLocalPod(config, testVol)
@ -213,18 +197,6 @@ var _ = SIGDescribe("PersistentVolumes-local [Feature:LocalPersistentVolumes] [S
AfterEach(func() {
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}
@ -289,7 +261,7 @@ var _ = SIGDescribe("PersistentVolumes-local [Feature:LocalPersistentVolumes] [S
reason: "FailedScheduling",
pattern: make([]string, 2)}
ep.pattern = append(ep.pattern, "MatchNodeSelector")
ep.pattern = append(ep.pattern, "No nodes are available")
ep.pattern = append(ep.pattern, "NoVolumeNodeConflict")
for _, testVolType := range LocalVolumeTypes {
It("should not be able to mount due to different NodeAffinity", func() {