ScaleIO: use a fresh mounter for every SetUp/TearDown

A volume plugin should not cache Mounter for a long time, it can get a
different one with each SetUp/TearDown call.
This commit is contained in:
Jan Safranek
2017-08-22 13:25:09 +02:00
parent 07dea6b447
commit dbaf41e92a
3 changed files with 6 additions and 10 deletions

View File

@@ -30,7 +30,6 @@ import (
"k8s.io/apimachinery/pkg/types"
fakeclient "k8s.io/client-go/kubernetes/fake"
utiltesting "k8s.io/client-go/util/testing"
"k8s.io/kubernetes/pkg/util/mount"
"k8s.io/kubernetes/pkg/volume"
volumetest "k8s.io/kubernetes/pkg/volume/testing"
)
@@ -138,8 +137,6 @@ func TestVolumeMounterUnmounter(t *testing.T) {
t.Errorf("Cannot assert plugin to be type sioPlugin")
}
sioPlug.mounter = &mount.FakeMounter{}
vol := &api.Volume{
Name: testSioVolName,
VolumeSource: api.VolumeSource{