mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Re-enable write-read pv check in volume provisioning tests
This commit is contained in:
parent
421789328f
commit
c968beceb1
@ -132,7 +132,6 @@ func (h *hostpathCSIDriver) createStorageClassTest(node v1.Node) storageClassTes
|
|||||||
claimSize: "1Gi",
|
claimSize: "1Gi",
|
||||||
expectedSize: "1Gi",
|
expectedSize: "1Gi",
|
||||||
nodeName: node.Name,
|
nodeName: node.Name,
|
||||||
attach: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +197,6 @@ func (g *gcePDCSIDriver) createStorageClassTest(node v1.Node) storageClassTest {
|
|||||||
claimSize: "5Gi",
|
claimSize: "5Gi",
|
||||||
expectedSize: "5Gi",
|
expectedSize: "5Gi",
|
||||||
nodeName: node.Name,
|
nodeName: node.Name,
|
||||||
attach: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,16 +48,16 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type storageClassTest struct {
|
type storageClassTest struct {
|
||||||
name string
|
name string
|
||||||
cloudProviders []string
|
cloudProviders []string
|
||||||
provisioner string
|
provisioner string
|
||||||
parameters map[string]string
|
parameters map[string]string
|
||||||
claimSize string
|
claimSize string
|
||||||
expectedSize string
|
expectedSize string
|
||||||
pvCheck func(volume *v1.PersistentVolume) error
|
pvCheck func(volume *v1.PersistentVolume) error
|
||||||
nodeName string
|
nodeName string
|
||||||
attach bool
|
skipWriteReadCheck bool
|
||||||
volumeMode *v1.PersistentVolumeMode
|
volumeMode *v1.PersistentVolumeMode
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -132,7 +132,7 @@ func testDynamicProvisioning(t storageClassTest, client clientset.Interface, cla
|
|||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.attach {
|
if !t.skipWriteReadCheck {
|
||||||
// We start two pods:
|
// We start two pods:
|
||||||
// - The first writes 'hello word' to the /mnt/test (= the volume).
|
// - The first writes 'hello word' to the /mnt/test (= the volume).
|
||||||
// - The second one runs grep 'hello world' on /mnt/test.
|
// - The second one runs grep 'hello world' on /mnt/test.
|
||||||
@ -796,12 +796,12 @@ var _ = utils.SIGDescribe("Dynamic Provisioning", func() {
|
|||||||
serverUrl := "https://" + pod.Status.PodIP + ":8081"
|
serverUrl := "https://" + pod.Status.PodIP + ":8081"
|
||||||
By("creating a StorageClass")
|
By("creating a StorageClass")
|
||||||
test := storageClassTest{
|
test := storageClassTest{
|
||||||
name: "Gluster Dynamic provisioner test",
|
name: "Gluster Dynamic provisioner test",
|
||||||
provisioner: "kubernetes.io/glusterfs",
|
provisioner: "kubernetes.io/glusterfs",
|
||||||
claimSize: "2Gi",
|
claimSize: "2Gi",
|
||||||
expectedSize: "2Gi",
|
expectedSize: "2Gi",
|
||||||
parameters: map[string]string{"resturl": serverUrl},
|
parameters: map[string]string{"resturl": serverUrl},
|
||||||
attach: false,
|
skipWriteReadCheck: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
// GCE/GKE
|
// GCE/GKE
|
||||||
@ -833,10 +833,11 @@ var _ = utils.SIGDescribe("Dynamic Provisioning", func() {
|
|||||||
By("creating a claim with default class")
|
By("creating a claim with default class")
|
||||||
block := v1.PersistentVolumeBlock
|
block := v1.PersistentVolumeBlock
|
||||||
test := storageClassTest{
|
test := storageClassTest{
|
||||||
name: "default",
|
name: "default",
|
||||||
claimSize: "2Gi",
|
claimSize: "2Gi",
|
||||||
expectedSize: "2Gi",
|
expectedSize: "2Gi",
|
||||||
volumeMode: &block,
|
volumeMode: &block,
|
||||||
|
skipWriteReadCheck: true,
|
||||||
}
|
}
|
||||||
// gce or gke
|
// gce or gke
|
||||||
if getDefaultPluginName() == "kubernetes.io/gce-pd" {
|
if getDefaultPluginName() == "kubernetes.io/gce-pd" {
|
||||||
|
Loading…
Reference in New Issue
Block a user