mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
e2e: add tests to validate cluster name
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
parent
3ddb8c289c
commit
2390a43415
@ -194,6 +194,14 @@ var _ = Describe(cephfsType, func() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to create node secret: %v", err)
|
e2elog.Failf("failed to create node secret: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wait for cluster name update in deployment
|
||||||
|
containers := []string{cephFSContainerName}
|
||||||
|
err = waitForContainersArgsUpdate(c, cephCSINamespace, cephFSDeploymentName,
|
||||||
|
"clustername", defaultClusterName, containers, deployTimeout)
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Failf("timeout waiting for deployment update %s/%s: %v", cephCSINamespace, cephFSDeploymentName, err)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
AfterEach(func() {
|
AfterEach(func() {
|
||||||
@ -441,6 +449,8 @@ var _ = Describe(cephfsType, func() {
|
|||||||
e2elog.Failf("expected pvcNamespace %q got %q", pvc.Namespace, metadata.PVCNamespaceKey)
|
e2elog.Failf("expected pvcNamespace %q got %q", pvc.Namespace, metadata.PVCNamespaceKey)
|
||||||
} else if metadata.PVNameKey != pvcObj.Spec.VolumeName {
|
} else if metadata.PVNameKey != pvcObj.Spec.VolumeName {
|
||||||
e2elog.Failf("expected pvName %q got %q", pvcObj.Spec.VolumeName, metadata.PVNameKey)
|
e2elog.Failf("expected pvName %q got %q", pvcObj.Spec.VolumeName, metadata.PVNameKey)
|
||||||
|
} else if metadata.ClusterNameKey != defaultClusterName {
|
||||||
|
e2elog.Failf("expected clusterName %q got %q", defaultClusterName, metadata.ClusterNameKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
|
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
|
||||||
|
@ -216,6 +216,7 @@ type cephfsSubvolumeMetadata struct {
|
|||||||
PVCNameKey string `json:"csi.storage.k8s.io/pvc/name"`
|
PVCNameKey string `json:"csi.storage.k8s.io/pvc/name"`
|
||||||
PVCNamespaceKey string `json:"csi.storage.k8s.io/pvc/namespace"`
|
PVCNamespaceKey string `json:"csi.storage.k8s.io/pvc/namespace"`
|
||||||
PVNameKey string `json:"csi.storage.k8s.io/pv/name"`
|
PVNameKey string `json:"csi.storage.k8s.io/pv/name"`
|
||||||
|
ClusterNameKey string `json:"csi.ceph.com/cluster/name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func listCephFSSubvolumeMetadata(
|
func listCephFSSubvolumeMetadata(
|
||||||
|
Loading…
Reference in New Issue
Block a user