Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewTestPlugin (0.11 sec)

  1. pkg/volume/csi/testing/testing.go

    	utiltesting "k8s.io/client-go/util/testing"
    	"k8s.io/kubernetes/pkg/volume"
    	"k8s.io/kubernetes/pkg/volume/csi"
    	volumetest "k8s.io/kubernetes/pkg/volume/testing"
    )
    
    // NewTestPlugin creates a plugin mgr to load plugins and setup a fake client
    func NewTestPlugin(t *testing.T, client *fakeclient.Clientset) (*volume.VolumePluginMgr, *volume.VolumePlugin, string) {
    	tmpDir, err := utiltesting.MkTmpdir("csi-test")
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 07 00:11:50 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  2. pkg/volume/plugins_test.go

    	return ReconstructedVolume{}, nil
    }
    
    func newTestPlugin() []VolumePlugin {
    	return []VolumePlugin{&testPlugins{}}
    }
    
    func TestVolumePluginMgrFunc(t *testing.T) {
    	vpm := VolumePluginMgr{}
    	var prober DynamicPluginProber = nil // TODO (#51147) inject mock
    	vpm.InitPlugins(newTestPlugin(), prober, nil)
    
    	plug, err := vpm.FindPluginByName(testPluginName)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. pkg/volume/csi/expander_test.go

    					"apiUsername": []byte("csiusername"),
    					"apiPassword": []byte("csipassword"),
    				},
    			},
    		},
    	}
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			plug, tmpDir := newTestPlugin(t, nil)
    			defer os.RemoveAll(tmpDir)
    
    			spec := volume.NewSpecFromPersistentVolume(makeTestPV("test-pv", 10, "expandable", "test-vol"), false)
    			if tc.enableCSINodeExpandSecret {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 03:58:36 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  4. pkg/volume/csi/csi_util_test.go

    		driver.Spec.SELinuxMount = &seLinuxMountSupport
    	case "no_selinux":
    		driver.Spec.SELinuxMount = &noSElinuxMountSupport
    	}
    	return driver
    }
    
    func TestSaveVolumeData(t *testing.T) {
    	plug, tmpDir := newTestPlugin(t, nil)
    	defer os.RemoveAll(tmpDir)
    	testCases := []struct {
    		name       string
    		data       map[string]string
    		shouldFail bool
    	}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 5.5K bytes
    - Viewed (0)
Back to top