Merge pull request #56183 from jeffvance/e2e-issue-56041

Automatic merge from submit-queue (batch tested with PRs 51321, 55969, 55039, 56183, 55976). 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>.

use local `diskNames` slice to fix issue 56041

Fixes #56041 

```release-note
NONE
```
@msau42
pull/6/head
Kubernetes Submit Queue 2017-11-22 11:59:58 -08:00 committed by GitHub
commit 6d519edfbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,6 @@ var _ = SIGDescribe("Pod Disks", func() {
})
Context("schedule a pod w/ RW PD(s) mounted to 1 or more containers, write to PD, verify content, delete pod, and repeat in rapid succession [Slow]", func() {
var diskNames []string
type testT struct {
numContainers int
numPDs int
@ -243,6 +242,7 @@ var _ = SIGDescribe("Pod Disks", func() {
var host0Pod *v1.Pod
var err error
fileAndContentToVerify := make(map[string]string)
diskNames := make([]string, 0, numPDs)
By(fmt.Sprintf("creating %d PD(s)", numPDs))
for i := 0; i < numPDs; i++ {