|
67 | 67 |
|
68 | 68 | driverNameAnnotation = map[string]string{annStorageProvisioner: driverName}
|
69 | 69 | translatedKey = "translated"
|
| 70 | + defaultfsType = "ext4" |
70 | 71 | )
|
71 | 72 |
|
72 | 73 | type csiConnection struct {
|
@@ -405,7 +406,7 @@ func TestCreateDriverReturnsInvalidCapacityDuringProvision(t *testing.T) {
|
405 | 406 |
|
406 | 407 | pluginCaps, controllerCaps := provisionCapabilities()
|
407 | 408 | csiProvisioner := NewCSIProvisioner(nil, 5*time.Second, "test-provisioner", "test",
|
408 |
| - 5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false) |
| 409 | + 5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false, defaultfsType) |
409 | 410 |
|
410 | 411 | // Requested PVC with requestedBytes storage
|
411 | 412 | deletePolicy := v1.PersistentVolumeReclaimDelete
|
@@ -1662,7 +1663,7 @@ func runProvisionTest(t *testing.T, k string, tc provisioningTestcase, requested
|
1662 | 1663 |
|
1663 | 1664 | pluginCaps, controllerCaps := provisionCapabilities()
|
1664 | 1665 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5, csiConn.conn,
|
1665 |
| - nil, provisionDriverName, pluginCaps, controllerCaps, supportsMigrationFromInTreePluginName, false, csitrans.New(), nil, nil, nil, tc.withExtraMetadata) |
| 1666 | + nil, provisionDriverName, pluginCaps, controllerCaps, supportsMigrationFromInTreePluginName, false, csitrans.New(), nil, nil, nil, tc.withExtraMetadata, defaultfsType) |
1666 | 1667 |
|
1667 | 1668 | out := &csi.CreateVolumeResponse{
|
1668 | 1669 | Volume: &csi.Volume{
|
@@ -2398,7 +2399,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
|
2398 | 2399 |
|
2399 | 2400 | pluginCaps, controllerCaps := provisionFromSnapshotCapabilities()
|
2400 | 2401 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5, csiConn.conn,
|
2401 |
| - client, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false) |
| 2402 | + client, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false, defaultfsType) |
2402 | 2403 |
|
2403 | 2404 | out := &csi.CreateVolumeResponse{
|
2404 | 2405 | Volume: &csi.Volume{
|
@@ -2572,7 +2573,7 @@ func TestProvisionWithTopologyEnabled(t *testing.T) {
|
2572 | 2573 | defer close(stopChan)
|
2573 | 2574 |
|
2574 | 2575 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5,
|
2575 |
| - csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), scLister, csiNodeLister, nodeLister, false) |
| 2576 | + csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), scLister, csiNodeLister, nodeLister, false, defaultfsType) |
2576 | 2577 |
|
2577 | 2578 | pv, err := csiProvisioner.Provision(controller.ProvisionOptions{
|
2578 | 2579 | StorageClass: &storagev1.StorageClass{},
|
@@ -2627,7 +2628,7 @@ func TestProvisionWithTopologyDisabled(t *testing.T) {
|
2627 | 2628 | clientSet := fakeclientset.NewSimpleClientset()
|
2628 | 2629 | pluginCaps, controllerCaps := provisionWithTopologyCapabilities()
|
2629 | 2630 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5,
|
2630 |
| - csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false) |
| 2631 | + csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false, defaultfsType) |
2631 | 2632 |
|
2632 | 2633 | out := &csi.CreateVolumeResponse{
|
2633 | 2634 | Volume: &csi.Volume{
|
@@ -2799,7 +2800,7 @@ func runDeleteTest(t *testing.T, k string, tc deleteTestcase) {
|
2799 | 2800 | pluginCaps, controllerCaps := provisionCapabilities()
|
2800 | 2801 | scLister, _, _, _ := listers(clientSet)
|
2801 | 2802 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5,
|
2802 |
| - csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), scLister, nil, nil, false) |
| 2803 | + csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), scLister, nil, nil, false, defaultfsType) |
2803 | 2804 |
|
2804 | 2805 | err = csiProvisioner.Delete(tc.persistentVolume)
|
2805 | 2806 | if tc.expectErr && err == nil {
|
@@ -3501,7 +3502,7 @@ func TestProvisionFromPVC(t *testing.T) {
|
3501 | 3502 | }
|
3502 | 3503 |
|
3503 | 3504 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5, csiConn.conn,
|
3504 |
| - nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false) |
| 3505 | + nil, driverName, pluginCaps, controllerCaps, "", false, csitrans.New(), nil, nil, nil, false, defaultfsType) |
3505 | 3506 |
|
3506 | 3507 | pv, err := csiProvisioner.Provision(tc.volOpts)
|
3507 | 3508 | if tc.expectErr && err == nil {
|
@@ -3580,7 +3581,7 @@ func TestProvisionWithMigration(t *testing.T) {
|
3580 | 3581 | pluginCaps, controllerCaps := provisionCapabilities()
|
3581 | 3582 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner",
|
3582 | 3583 | "test", 5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps,
|
3583 |
| - inTreePluginName, false, mockTranslator, nil, nil, nil, false) |
| 3584 | + inTreePluginName, false, mockTranslator, nil, nil, nil, false, defaultfsType) |
3584 | 3585 |
|
3585 | 3586 | // Set up return values (AnyTimes to avoid overfitting on implementation)
|
3586 | 3587 |
|
@@ -3740,7 +3741,7 @@ func TestDeleteMigration(t *testing.T) {
|
3740 | 3741 | pluginCaps, controllerCaps := provisionCapabilities()
|
3741 | 3742 | csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner",
|
3742 | 3743 | "test", 5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "",
|
3743 |
| - false, mockTranslator, nil, nil, nil, false) |
| 3744 | + false, mockTranslator, nil, nil, nil, false, defaultfsType) |
3744 | 3745 |
|
3745 | 3746 | // Set mock return values (AnyTimes to avoid overfitting on implementation details)
|
3746 | 3747 | mockTranslator.EXPECT().IsPVMigratable(gomock.Any()).Return(tc.expectTranslation).AnyTimes()
|
|
0 commit comments