Commit 07038c94 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46395 from mindprince/issue-46204-45803-kubelet-volumes-test-flake

Automatic merge from submit-queue (batch tested with PRs 46429, 46308, 46395, 45867, 45492) Implement FakeVolumePlugin's ConstructVolumeSpec method according to interface expectation. This fixes #45803 and #46204. **Release note**: ```release-note NONE ```
parents 54a47a6f 2b594d61
......@@ -112,6 +112,7 @@ func TestParseResolvConf(t *testing.T) {
func TestComposeDNSSearch(t *testing.T) {
testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */)
defer testKubelet.Cleanup()
kubelet := testKubelet.kubelet
recorder := record.NewFakeRecorder(20)
......
......@@ -33,6 +33,7 @@ import (
func TestListVolumesForPod(t *testing.T) {
testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */)
defer testKubelet.Cleanup()
kubelet := testKubelet.kubelet
pod := podWithUidNameNsSpec("12345678", "foo", "test", v1.PodSpec{
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment