From 0f5cc4027f0e5ee0a058b0e101328503d6b08891 Mon Sep 17 00:00:00 2001 From: Rohit Agarwal Date: Wed, 24 May 2017 17:26:34 -0700 Subject: [PATCH] Implement FakeVolumePlugin's ConstructVolumeSpec method according to interface expectation. This fixes #45803 and #46204. --- pkg/volume/testing/testing.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/volume/testing/testing.go b/pkg/volume/testing/testing.go index 8eccc091bf4..6c809c987cb 100644 --- a/pkg/volume/testing/testing.go +++ b/pkg/volume/testing/testing.go @@ -303,7 +303,11 @@ func (plugin *FakeVolumePlugin) GetAccessModes() []v1.PersistentVolumeAccessMode } func (plugin *FakeVolumePlugin) ConstructVolumeSpec(volumeName, mountPath string) (*Spec, error) { - return nil, nil + return &Spec{ + Volume: &v1.Volume{ + Name: volumeName, + }, + }, nil } func (plugin *FakeVolumePlugin) GetDeviceMountRefs(deviceMountPath string) ([]string, error) {