Skip to content

Commit

Permalink
Allow a tolerance of up to 1% when verifying volume size in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwlehman committed Jul 27, 2021
1 parent 2bbcbf5 commit d5bb68e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test-verify-volume-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
var: storage_test_expected_size

- assert:
that: storage_test_actual_size.bytes == storage_test_expected_size|int
that: (storage_test_expected_size|int - storage_test_actual_size.bytes)|abs / storage_test_expected_size|int < 0.01
msg: "Volume {{ storage_test_volume.name }} has unexpected size ({{ storage_test_expected_size|int }} / {{ storage_test_actual_size.bytes }})"
when: _storage_test_volume_present and storage_test_volume.type == "lvm"

0 comments on commit d5bb68e

Please sign in to comment.