remove volumeoptions from VolumePlugin and BlockVolumePlugin

This commit is contained in:
carlory
2024-05-23 19:21:54 +08:00
parent 57d197fb89
commit c4851c64a0
46 changed files with 112 additions and 147 deletions

View File

@@ -215,7 +215,7 @@ func TestInvalidHostPath(t *testing.T) {
VolumeSource: v1.VolumeSource{HostPath: &v1.HostPathVolumeSource{Path: "/no/backsteps/allowed/.."}},
}
pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}}
mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{})
mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod)
if err != nil {
t.Fatal(err)
}
@@ -243,7 +243,7 @@ func TestPlugin(t *testing.T) {
}
pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}}
defer os.RemoveAll(volPath)
mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{})
mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod)
if err != nil {
t.Errorf("Failed to make a new Mounter: %v", err)
}
@@ -311,7 +311,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) {
// readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes
spec := volume.NewSpecFromPersistentVolume(pv, true)
pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}}
mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{})
mounter, _ := plug.NewMounter(spec, pod)
if mounter == nil {
t.Fatalf("Got a nil Mounter")
}