clean up parm in func
This commit is contained in:
parent
b89d93887d
commit
e454cd638a
@ -39,7 +39,7 @@ func (t *DynamicallyProvisionedInlineVolumeTest) Run(client clientset.Interface,
|
||||
for _, pod := range t.Pods {
|
||||
var tpod *TestPod
|
||||
var cleanup []func()
|
||||
tpod, cleanup = pod.SetupWithCSIInlineVolumes(client, namespace, t.CSIDriver, t.Server, t.Share, t.MountOptions, t.ReadOnly)
|
||||
tpod, cleanup = pod.SetupWithCSIInlineVolumes(client, namespace, t.Server, t.Share, t.MountOptions, t.ReadOnly)
|
||||
// defer must be called here for resources not get removed before using them
|
||||
for i := range cleanup {
|
||||
defer cleanup[i]()
|
||||
|
||||
@ -117,7 +117,7 @@ func (pod *PodDetails) SetupWithDynamicVolumes(client clientset.Interface, names
|
||||
return tpod, cleanupFuncs
|
||||
}
|
||||
|
||||
func (pod *PodDetails) SetupWithCSIInlineVolumes(client clientset.Interface, namespace *v1.Namespace, _ driver.DynamicPVTestDriver, server, share, mountOptions string, readOnly bool) (*TestPod, []func()) {
|
||||
func (pod *PodDetails) SetupWithCSIInlineVolumes(client clientset.Interface, namespace *v1.Namespace, server, share, mountOptions string, readOnly bool) (*TestPod, []func()) {
|
||||
tpod := NewTestPod(client, namespace, pod.Cmd)
|
||||
cleanupFuncs := make([]func(), 0)
|
||||
for n, v := range pod.Volumes {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user