Skip to content

Commit

Permalink
Merge pull request #216 from dwlehman/test-verify-size-tolerance
Browse files Browse the repository at this point in the history
Allow a tolerance of up to 1% when verifying volume size in tests.
  • Loading branch information
richm authored Jul 28, 2021
2 parents 62e2f24 + d5bb68e commit 4eb9661
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 4eb9661

Please sign in to comment.