Skip to content

Commit 0f7901f

Browse files
fix requested_size logic for test_fs_overhead tests. (RedHatQE#2200)
Signed-off-by: Vamsi Krishna Siddu <vamsikrishna.siddu@ibm.com>
1 parent 6983e31 commit 0f7901f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/storage/fs_overhead/test_fs_overhead.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ def test_import_vm_with_specify_fs_overhead(updated_fs_overhead_20_with_hco, vm_
9393
pvc=PersistentVolumeClaim(name=vm_metadata["name"], namespace=vm_metadata["namespace"])
9494
),
9595
requested_size=bitmath.GiB(
96-
int(vm_for_fs_overhead_test.data_volume_template["spec"]["storage"]["resources"]["requests"]["storage"][0])
96+
int(
97+
bitmath.parse_string_unsafe(
98+
vm_for_fs_overhead_test.data_volume_template["spec"]["storage"]["resources"]["requests"]["storage"]
99+
).value
100+
)
97101
),
98102
)
99103

@@ -105,5 +109,5 @@ def test_upload_dv_with_specify_fs_overhead(
105109
):
106110
assert_fs_overhead_added(
107111
actual_size=get_pvc_size_gib(pvc=uploaded_cirros_dv.pvc),
108-
requested_size=bitmath.GiB(int(Images.Cirros.DEFAULT_DV_SIZE[0])),
112+
requested_size=bitmath.GiB(int(bitmath.parse_string_unsafe(Images.Cirros.DEFAULT_DV_SIZE).value)),
109113
)

0 commit comments

Comments
 (0)