Skip to content

Commit 3669f06

Browse files
committed
make test a bit stricter when property values obviously can't work
Signed-off-by: Matthias Büchse <[email protected]>
1 parent 1c33a43 commit 3669f06

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/iaas/image-metadata/image-md-check.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,13 @@ def validate_imageMD(img, outd_list):
285285
if not img.min_ram:
286286
print(f'ERROR: Image "{imgnm}": min_ram == 0', file=sys.stderr)
287287
errors += 1
288-
if img.min_disk * GIB < img.size:
289-
print(f'WARNING: Image "{imgnm}": img size == {img.size / MIB:.0f} MiB, but min_disk == {img.min_disk * GIB / MIB:.0f} MiB',
290-
file=sys.stderr)
291-
warnings += 1
292288
if not img.min_disk:
293289
print(f'ERROR: Image "{imgnm}": min_disk == 0', file=sys.stderr)
294290
errors += 1
291+
elif img.min_disk * GIB < img.size:
292+
print(f'ERROR: Image "{imgnm}": img size == {img.size / MIB:.0f} MiB, but min_disk == {img.min_disk * GIB / MIB:.0f} MiB',
293+
file=sys.stderr)
294+
errors += 1
295295
# (6) tags os:*, managed_by_*
296296
# Nothing to do here ... we could do a warning if those are missing ...
297297

0 commit comments

Comments
 (0)