mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-22 21:10:22 +00:00
e2e: compare resource.Quantity with Equals() instead of operator
When one Quantity is in GiB, and the other in Dec (bytes), the value should be the same. However, by using ==, this is not the case. It is needed to use Equals() for that. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
b5020657e6
commit
8870575a48
@ -52,7 +52,7 @@ func expandPVCSize(c kubernetes.Interface, pvc *v1.PersistentVolumeClaim, size s
|
||||
}
|
||||
}
|
||||
|
||||
if updatedPVC.Status.Capacity[v1.ResourceStorage] != resource.MustParse(size) {
|
||||
if !updatedPVC.Status.Capacity[v1.ResourceStorage].Equal(resource.MustParse(size)) {
|
||||
e2elog.Logf("current size in status %v,expected size %v", updatedPVC.Status.Capacity[v1.ResourceStorage], resource.MustParse(size))
|
||||
return false, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user