Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for NewSpecFromVolume (0.23 sec)

  1. pkg/volume/configmap/configmap_test.go

    	mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{})
    	if err != nil {
    		t.Errorf("Failed to make a new Mounter: %v", err)
    	}
    	if mounter == nil {
    		t.Fatalf("Got a nil Mounter")
    	}
    
    	vName, err := plugin.GetVolumeName(volume.NewSpecFromVolume(volumeSpec))
    	if err != nil {
    		t.Errorf("Failed to GetVolumeName: %v", err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 11:12:06 UTC 2022
    - 19.9K bytes
    - Viewed (0)
  2. pkg/volume/csi/csi_plugin_test.go

    			specVolID:  "volspec",
    			originSpec: volume.NewSpecFromVolume(makeTestVol("volspec", testDriver)),
    			podUID:     types.UID(fmt.Sprintf("%08X", rand.Uint64())),
    			modes:      []storage.VolumeLifecycleMode{storage.VolumeLifecycleEphemeral},
    		},
    		{
    			name:       "construct spec from volume spec2",
    			specVolID:  "volspec2",
    			originSpec: volume.NewSpecFromVolume(makeTestVol("volspec2", testDriver)),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  3. pkg/volume/nfs/nfs_test.go

    	}
    	doTestPlugin(t, volume.NewSpecFromVolume(vol), "localhost:/somepath")
    }
    
    func TestIPV6VolumeSource(t *testing.T) {
    	vol := &v1.Volume{
    		Name:         "vol1",
    		VolumeSource: v1.VolumeSource{NFS: &v1.NFSVolumeSource{Server: "0:0:0:0:0:0:0:1", Path: "/somepath", ReadOnly: false}},
    	}
    	doTestPlugin(t, volume.NewSpecFromVolume(vol), "[0:0:0:0:0:0:0:1]:/somepath")
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 9K bytes
    - Viewed (0)
  4. pkg/volume/csi/csi_test.go

    			},
    		},
    		{
    			name:    "ephemeral inline supported",
    			driver:  "inline-driver-1",
    			volName: "test.vol2",
    			specFunc: func(specName, driver, volName string) *volume.Spec {
    				return volume.NewSpecFromVolume(makeTestVol(specName, driver))
    			},
    			podFunc: func() *api.Pod {
    				podUID := types.UID(fmt.Sprintf("%08X", rand.Uint64()))
    				return &api.Pod{ObjectMeta: meta.ObjectMeta{UID: podUID, Namespace: testns}}
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 03 15:55:13 UTC 2022
    - 21.1K bytes
    - Viewed (0)
  5. pkg/volume/flexvolume/common_test.go

    		Name: "vol1",
    		VolumeSource: v1.VolumeSource{
    			FlexVolume: &v1.FlexVolumeSource{
    				Driver:   "kubernetes.io/fakeAttacher",
    				ReadOnly: false,
    			},
    		},
    	}
    	return volume.NewSpecFromVolume(vol)
    }
    
    func specJSON(plugin *flexVolumeAttachablePlugin, spec *volume.Spec, extraOptions map[string]string) string {
    	o, err := NewOptionsForDriver(spec, plugin.host, extraOptions)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  6. pkg/volume/secret/secret_test.go

    	if err != nil {
    		t.Fatal("Can't find the plugin by name")
    	}
    
    	pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}}
    	mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{})
    	if err != nil {
    		t.Errorf("Failed to make a new Mounter: %v", err)
    	}
    	if mounter == nil {
    		t.Fatalf("Got a nil Mounter")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 19.5K bytes
    - Viewed (0)
  7. pkg/volume/csi/csi_attacher_test.go

    				{"vol0", volume.NewSpecFromPersistentVolume(makeTestPV("pv0", 10, testDriver, "vol0"), false), true},
    				{"vol1", volume.NewSpecFromVolume(makeTestVol("pv1", testDriver)), false},
    				{"vol2", volume.NewSpecFromPersistentVolume(makeTestPV("pv2", 10, testDriver, "vol2"), false), true},
    				{"vol3", volume.NewSpecFromVolume(makeTestVol("pv3", testDriver)), false},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 12:23:16 UTC 2024
    - 58.1K bytes
    - Viewed (0)
  8. pkg/volume/fc/fc_test.go

    		VolumeSource: v1.VolumeSource{
    			FC: &v1.FCVolumeSource{
    				TargetWWNs: []string{"500a0981891b8dc5"},
    				FSType:     "ext4",
    				Lun:        &lun,
    			},
    		},
    	}
    	doTestPlugin(t, volume.NewSpecFromVolume(vol))
    }
    
    func TestPluginPersistentVolume(t *testing.T) {
    	lun := int32(0)
    	fs := v1.PersistentVolumeFilesystem
    	vol := &v1.PersistentVolume{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: "vol1",
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 14.1K bytes
    - Viewed (0)
  9. pkg/volume/plugins_test.go

    func TestSpecSourceConverters(t *testing.T) {
    	v := &v1.Volume{
    		Name:         "foo",
    		VolumeSource: v1.VolumeSource{EmptyDir: &v1.EmptyDirVolumeSource{}},
    	}
    
    	converted := NewSpecFromVolume(v)
    	if converted.Volume.EmptyDir == nil {
    		t.Errorf("Unexpected nil EmptyDir: %#v", converted)
    	}
    	if v.Name != converted.Name() {
    		t.Errorf("Expected %v but got %v", converted.Name(), v.Name)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  10. pkg/volume/projected/projected_test.go

    	if err != nil {
    		t.Fatal("Can't find the plugin by name")
    	}
    
    	pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}}
    	mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{})
    	if err != nil {
    		t.Errorf("Failed to make a new Mounter: %v", err)
    	}
    	if mounter == nil {
    		t.Errorf("Got a nil Mounter")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 40.5K bytes
    - Viewed (0)
Back to top