mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Refactor volume interfaces to receive pod instead of ObjectReference
This commit is contained in:
		| @@ -119,7 +119,8 @@ func TestPlugin(t *testing.T) { | ||||
| 			}, | ||||
| 		}, | ||||
| 	} | ||||
| 	builder, err := plug.NewBuilder(volume.NewSpecFromVolume(spec), &api.ObjectReference{UID: types.UID("poduid")}, volume.VolumeOptions{""}, mount.New()) | ||||
| 	pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: types.UID("poduid")}} | ||||
| 	builder, err := plug.NewBuilder(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{""}, mount.New()) | ||||
| 	if err != nil { | ||||
| 		t.Errorf("Failed to make a new Builder: %v", err) | ||||
| 	} | ||||
| @@ -175,7 +176,8 @@ func TestPluginLegacy(t *testing.T) { | ||||
| 	} | ||||
|  | ||||
| 	spec := &api.Volume{VolumeSource: api.VolumeSource{GitRepo: &api.GitRepoVolumeSource{}}} | ||||
| 	if _, err := plug.NewBuilder(volume.NewSpecFromVolume(spec), &api.ObjectReference{UID: types.UID("poduid")}, volume.VolumeOptions{""}, nil); err == nil { | ||||
| 	pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: types.UID("poduid")}} | ||||
| 	if _, err := plug.NewBuilder(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{""}, nil); err == nil { | ||||
| 		t.Errorf("Expected failiure") | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Paul Morie
					Paul Morie