mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
e2e: validate clusterName metadata
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
parent
de7128b3a2
commit
cf97e377fa
@ -970,7 +970,10 @@ var _ = Describe(cephfsType, func() {
|
||||
} else if metadata.VolSnapContentNameKey != content.Name {
|
||||
e2elog.Failf("failed, contentname expected:%s got:%s",
|
||||
content.Name, metadata.VolSnapContentNameKey)
|
||||
} else if metadata.ClusterNameKey != defaultClusterName {
|
||||
e2elog.Failf("expected clusterName %q got %q", defaultClusterName, metadata.ClusterNameKey)
|
||||
}
|
||||
|
||||
// Delete the parent pvc before restoring
|
||||
// another one from snapshot.
|
||||
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
|
||||
@ -1005,6 +1008,8 @@ var _ = Describe(cephfsType, func() {
|
||||
e2elog.Failf("expected pvcNamespace %q got %q", pvcClone.Namespace, cloneMetadata.PVCNamespaceKey)
|
||||
} else if cloneMetadata.PVNameKey != pvcCloneObj.Spec.VolumeName {
|
||||
e2elog.Failf("expected pvName %q got %q", pvcCloneObj.Spec.VolumeName, cloneMetadata.PVNameKey)
|
||||
} else if cloneMetadata.ClusterNameKey != defaultClusterName {
|
||||
e2elog.Failf("expected clusterName %q got %q", defaultClusterName, cloneMetadata.ClusterNameKey)
|
||||
}
|
||||
|
||||
// delete clone
|
||||
@ -1067,6 +1072,8 @@ var _ = Describe(cephfsType, func() {
|
||||
e2elog.Failf("expected pvcNamespace %q got %q", pvc.Namespace, cloneMetadata.PVCNamespaceKey)
|
||||
} else if cloneMetadata.PVNameKey != pvcCloneObj.Spec.VolumeName {
|
||||
e2elog.Failf("expected pvName %q got %q", pvcCloneObj.Spec.VolumeName, cloneMetadata.PVNameKey)
|
||||
} else if cloneMetadata.ClusterNameKey != defaultClusterName {
|
||||
e2elog.Failf("expected clusterName %q got %q", defaultClusterName, cloneMetadata.ClusterNameKey)
|
||||
}
|
||||
|
||||
err = deletePVCAndValidatePV(f.ClientSet, pvcClone, deployTimeout)
|
||||
|
@ -249,6 +249,7 @@ type cephfsSnapshotMetadata struct {
|
||||
VolSnapNameKey string `json:"csi.storage.k8s.io/volumesnapshot/name"`
|
||||
VolSnapNamespaceKey string `json:"csi.storage.k8s.io/volumesnapshot/namespace"`
|
||||
VolSnapContentNameKey string `json:"csi.storage.k8s.io/volumesnapshotcontent/name"`
|
||||
ClusterNameKey string `json:"csi.ceph.com/cluster/name"`
|
||||
}
|
||||
|
||||
func listCephFSSnapshotMetadata(
|
||||
|
Loading…
Reference in New Issue
Block a user