mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-14 02:10:21 +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 {
|
} else if metadata.VolSnapContentNameKey != content.Name {
|
||||||
e2elog.Failf("failed, contentname expected:%s got:%s",
|
e2elog.Failf("failed, contentname expected:%s got:%s",
|
||||||
content.Name, metadata.VolSnapContentNameKey)
|
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
|
// Delete the parent pvc before restoring
|
||||||
// another one from snapshot.
|
// another one from snapshot.
|
||||||
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
|
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)
|
e2elog.Failf("expected pvcNamespace %q got %q", pvcClone.Namespace, cloneMetadata.PVCNamespaceKey)
|
||||||
} else if cloneMetadata.PVNameKey != pvcCloneObj.Spec.VolumeName {
|
} else if cloneMetadata.PVNameKey != pvcCloneObj.Spec.VolumeName {
|
||||||
e2elog.Failf("expected pvName %q got %q", pvcCloneObj.Spec.VolumeName, cloneMetadata.PVNameKey)
|
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
|
// delete clone
|
||||||
@ -1067,6 +1072,8 @@ var _ = Describe(cephfsType, func() {
|
|||||||
e2elog.Failf("expected pvcNamespace %q got %q", pvc.Namespace, cloneMetadata.PVCNamespaceKey)
|
e2elog.Failf("expected pvcNamespace %q got %q", pvc.Namespace, cloneMetadata.PVCNamespaceKey)
|
||||||
} else if cloneMetadata.PVNameKey != pvcCloneObj.Spec.VolumeName {
|
} else if cloneMetadata.PVNameKey != pvcCloneObj.Spec.VolumeName {
|
||||||
e2elog.Failf("expected pvName %q got %q", pvcCloneObj.Spec.VolumeName, cloneMetadata.PVNameKey)
|
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)
|
err = deletePVCAndValidatePV(f.ClientSet, pvcClone, deployTimeout)
|
||||||
|
@ -249,6 +249,7 @@ type cephfsSnapshotMetadata struct {
|
|||||||
VolSnapNameKey string `json:"csi.storage.k8s.io/volumesnapshot/name"`
|
VolSnapNameKey string `json:"csi.storage.k8s.io/volumesnapshot/name"`
|
||||||
VolSnapNamespaceKey string `json:"csi.storage.k8s.io/volumesnapshot/namespace"`
|
VolSnapNamespaceKey string `json:"csi.storage.k8s.io/volumesnapshot/namespace"`
|
||||||
VolSnapContentNameKey string `json:"csi.storage.k8s.io/volumesnapshotcontent/name"`
|
VolSnapContentNameKey string `json:"csi.storage.k8s.io/volumesnapshotcontent/name"`
|
||||||
|
ClusterNameKey string `json:"csi.ceph.com/cluster/name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func listCephFSSnapshotMetadata(
|
func listCephFSSnapshotMetadata(
|
||||||
|
Loading…
Reference in New Issue
Block a user