mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Update e2e tests to use beta provisioning.
GKE has not the new API and can't use PVC.Spec.StorageClassName attribute.
This commit is contained in:
parent
9487552e41
commit
c57b246fba
@ -103,13 +103,15 @@ var _ = framework.KubeDescribe("Dynamic provisioning", func() {
|
||||
ns = f.Namespace.Name
|
||||
})
|
||||
|
||||
/*
|
||||
TODO: enable when GKE is updated with the new API
|
||||
framework.KubeDescribe("DynamicProvisioner", func() {
|
||||
It("should create and delete persistent volumes [Slow] [Volume]", func() {
|
||||
framework.SkipUnlessProviderIs("openstack", "gce", "aws", "gke", "vsphere")
|
||||
|
||||
By("creating a StorageClass")
|
||||
class := newStorageClass("", "internal")
|
||||
_, err := c.StorageV1beta1().StorageClasses().Create(class)
|
||||
class, err := c.StorageV1beta1().StorageClasses().Create(class)
|
||||
defer c.StorageV1beta1().StorageClasses().Delete(class.Name, nil)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
@ -134,7 +136,7 @@ var _ = framework.KubeDescribe("Dynamic provisioning", func() {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
*/
|
||||
framework.KubeDescribe("DynamicProvisioner Beta", func() {
|
||||
It("should create and delete persistent volumes [Slow] [Volume]", func() {
|
||||
framework.SkipUnlessProviderIs("openstack", "gce", "aws", "gke")
|
||||
@ -202,8 +204,11 @@ var _ = framework.KubeDescribe("Dynamic provisioning", func() {
|
||||
|
||||
By("Creating a claim and expecting it to timeout")
|
||||
pvc := newClaim(ns)
|
||||
className := sc.Name
|
||||
pvc.Spec.StorageClassName = &className
|
||||
// TODO: switch to attribute when GKE is updated
|
||||
pvc.Annotations = map[string]string{
|
||||
v1.BetaStorageClassAnnotation: sc.Name,
|
||||
}
|
||||
//pvc.Spec.StorageClassName = &className
|
||||
pvc, err = c.Core().PersistentVolumeClaims(ns).Create(pvc)
|
||||
defer Expect(c.Core().PersistentVolumeClaims(ns).Delete(pvc.Name, nil)).To(Succeed())
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
@ -262,7 +267,9 @@ var _ = framework.KubeDescribe("Dynamic provisioning", func() {
|
||||
By("creating a claim with a dynamic provisioning annotation")
|
||||
claim := newClaim(ns)
|
||||
className := class.Name
|
||||
claim.Spec.StorageClassName = &className
|
||||
// TODO: switch to attribute when GKE is updated
|
||||
claim.Annotations = map[string]string{v1.BetaStorageClassAnnotation: className}
|
||||
//claim.Spec.StorageClassName = &className
|
||||
defer func() {
|
||||
c.Core().PersistentVolumeClaims(ns).Delete(claim.Name, nil)
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user