Skip to content

Commit

Permalink
Merge pull request eksctl-io#224 from leakingtapan/e2e
Browse files Browse the repository at this point in the history
Fix bug in e2e test
  • Loading branch information
k8s-ci-robot authored Feb 26, 2019
2 parents dcc33e2 + fce6df3 commit 5b3ddbe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/e2e/testsuites/specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package testsuites

import (
"fmt"

"github.com/kubernetes-sigs/aws-ebs-csi-driver/tests/e2e/driver"

"k8s.io/api/core/v1"
Expand Down Expand Up @@ -54,8 +55,8 @@ func (pod *PodDetails) SetupWithDynamicVolumes(client clientset.Interface, names
tpod := NewTestPod(client, namespace, pod.Cmd)
cleanupFuncs := make([]func(), 0)
for n, v := range pod.Volumes {
var tpvc *TestPersistentVolumeClaim
tpvc, cleanupFuncs = v.SetupDynamicPersistentVolumeClaim(client, namespace, csiDriver)
tpvc, funcs := v.SetupDynamicPersistentVolumeClaim(client, namespace, csiDriver)
cleanupFuncs = append(cleanupFuncs, funcs...)

tpod.SetupVolume(tpvc.persistentVolumeClaim, fmt.Sprintf("%s%d", v.VolumeMount.NameGenerate, n+1), fmt.Sprintf("%s%d", v.VolumeMount.MountPathGenerate, n+1), v.VolumeMount.ReadOnly)
}
Expand All @@ -66,8 +67,8 @@ func (pod *PodDetails) SetupWithPreProvisionedVolumes(client clientset.Interface
tpod := NewTestPod(client, namespace, pod.Cmd)
cleanupFuncs := make([]func(), 0)
for n, v := range pod.Volumes {
var tpvc *TestPersistentVolumeClaim
tpvc, cleanupFuncs = v.SetupPreProvisionedPersistentVolumeClaim(client, namespace, csiDriver)
tpvc, funcs := v.SetupPreProvisionedPersistentVolumeClaim(client, namespace, csiDriver)
cleanupFuncs = append(cleanupFuncs, funcs...)

tpod.SetupVolume(tpvc.persistentVolumeClaim, fmt.Sprintf("%s%d", v.VolumeMount.NameGenerate, n+1), fmt.Sprintf("%s%d", v.VolumeMount.MountPathGenerate, n+1), v.VolumeMount.ReadOnly)
}
Expand Down

0 comments on commit 5b3ddbe

Please sign in to comment.