mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Fix volumes e2e test to check fsType
This commit is contained in:
@@ -312,6 +312,9 @@ func (g *gcePDCSIDriver) GetDynamicProvisionStorageClass(fsType string) *storage
|
||||
suffix := fmt.Sprintf("%s-sc", g.driverInfo.Name)
|
||||
|
||||
parameters := map[string]string{"type": "pd-standard"}
|
||||
if fsType != "" {
|
||||
parameters["fsType"] = fsType
|
||||
}
|
||||
|
||||
return testsuites.GetStorageClass(provisioner, parameters, nil, ns, suffix)
|
||||
}
|
||||
@@ -412,6 +415,9 @@ func (g *gcePDExternalCSIDriver) GetDynamicProvisionStorageClass(fsType string)
|
||||
suffix := fmt.Sprintf("%s-sc", g.driverInfo.Name)
|
||||
|
||||
parameters := map[string]string{"type": "pd-standard"}
|
||||
if fsType != "" {
|
||||
parameters["fsType"] = fsType
|
||||
}
|
||||
|
||||
return testsuites.GetStorageClass(provisioner, parameters, nil, ns, suffix)
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ func testFlexVolume(driver string, cs clientset.Interface, config framework.Volu
|
||||
ExpectedContent: "Hello from flexvolume!",
|
||||
},
|
||||
}
|
||||
framework.TestVolumeClient(cs, config, nil, tests)
|
||||
framework.TestVolumeClient(cs, config, nil, "" /* fsType */, tests)
|
||||
|
||||
framework.VolumeTestCleanup(f, config)
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ func createVolumesTestInput(pattern testpatterns.TestPattern, resource genericVo
|
||||
config: &dInfo.Config,
|
||||
fsGroup: fsGroup,
|
||||
resource: resource,
|
||||
fsType: pattern.FsType,
|
||||
tests: []framework.VolumeTest{
|
||||
{
|
||||
Volume: *volSource,
|
||||
@@ -160,6 +161,7 @@ type volumesTestInput struct {
|
||||
name string
|
||||
config *TestConfig
|
||||
fsGroup *int64
|
||||
fsType string
|
||||
tests []framework.VolumeTest
|
||||
resource genericVolumeTestResource
|
||||
}
|
||||
@@ -175,7 +177,7 @@ func testVolumes(input *volumesTestInput) {
|
||||
volumeTest := input.tests
|
||||
config := convertTestConfig(input.config)
|
||||
framework.InjectHtml(cs, config, volumeTest[0].Volume, volumeTest[0].ExpectedContent)
|
||||
framework.TestVolumeClient(cs, config, input.fsGroup, input.tests)
|
||||
framework.TestVolumeClient(cs, config, input.fsGroup, input.fsType, input.tests)
|
||||
})
|
||||
It("should allow exec of files on the volume", func() {
|
||||
f := input.f
|
||||
|
||||
@@ -106,7 +106,7 @@ var _ = utils.SIGDescribe("Volumes", func() {
|
||||
ExpectedContent: "this is the second file",
|
||||
},
|
||||
}
|
||||
framework.TestVolumeClient(cs, config, nil, tests)
|
||||
framework.TestVolumeClient(cs, config, nil, "" /* fsType */, tests)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user