Refactor persistent volume initialization

There should be only one initialization function, shared by the real
controller and unit tests.
This commit is contained in:
Jan Safranek
2016-05-17 14:55:34 +02:00
parent 7f549511e2
commit 79b91b9ee0
6 changed files with 61 additions and 57 deletions

View File

@@ -55,7 +55,7 @@ func TestPersistentVolumeRecycler(t *testing.T) {
plugins := []volume.VolumePlugin{&volumetest.FakeVolumePlugin{"plugin-name", host, volume.VolumeConfig{}, volume.VolumeOptions{}, 0, 0, nil, nil, nil, nil}}
cloud := &fake_cloud.FakeCloud{}
ctrl := persistentvolumecontroller.NewPersistentVolumeController(testClient, 10*time.Second, nil, plugins, cloud, "")
ctrl := persistentvolumecontroller.NewPersistentVolumeController(testClient, 10*time.Second, nil, plugins, cloud, "", nil, nil, nil)
ctrl.Run()
defer ctrl.Stop()