zonemaster-engine
zonemaster-engine copied to clipboard
Updates TestUtil.pm for unit tests
Purpose
This PR introduces two changes to function in TestUtil.pm:
- Support of undelegated data (both NS and DS) for unit tests.
- Makes the function more flexible to avoid long lists of tags when not needed.
- Do not use diag/fail when there is an error in the
t
file. Use croak() instead. - More verifications of data.
The unit test file t/Test-nameserver15.t
has been updated to match the new format.
Context
The update is needed for https://github.com/zonemaster/zonemaster/pull/1255.
How to test this PR
Currently this will break most unit tests that depend on the t/TestUtil.pm
. Only t/Test-nameserver15.t
has been updated. Please review the code in TestUtil.pm
before the other t
files are updated.
@mattias-p, please re-review.
@mattias-p, could your re-review?
@tgreenx and @mattias-p, please re-review.
@mattias-p, @tgreenx and @marc-vanderwal, can you approve this? I would like to merge it. It updates TestUtils.pm and the unit tests that use it. They pass as expected.
I’ve had a look. I see no issues that haven’t already been brought up by @tgreenx.
@marc-vanderwal and @tgreenx, please re-review after my latest updates.
@marc-vanderwal and @tgreenx, please re-review after my latest updates. All tests pass. TestUtil now treats empty-empty as an error. Can this be merged now?
I have commited the proposal from @tgreenx and I have updated the documentation so that it states that empty-empty is not permitted. @marc-vanderwal and @tgreenx, please re-review.
@marc-vanderwal and @tgreenx, please re-review.