Fix typo in unit test of BASIC02#1465
Merged
marc-vanderwal merged 1 commit intoJul 28, 2025
Merged
Conversation
The scenario named GOOD-2 erroneously referred to a test zone named good-1.basic02.xa, instead of good-2.basic02.xa. Because of that, scenario GOOD-2 was not properly tested. Simply fixing the typo was not enough. No data was recorded about good-2.basic02.xa at all, so the companion .data file also needed to be regenerated.
matsduf
approved these changes
Jul 28, 2025
Contributor
|
Such an error is hard to find! Good spot! |
tgreenx
approved these changes
Jul 28, 2025
tgreenx
left a comment
Contributor
There was a problem hiding this comment.
Adding a check in t/TestUtil.pm would be great to catch those mistakes, as in most cases the zone name is derived from the test scenario name and test case name, but unfortunately that is not always the case
Contributor
The only scenarios when it is not is when the zone is the root zone, a TLD or an ARPA zone. The check could ignore those, and then most cases would be caught. |
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Jul 28, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Jul 29, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Jul 30, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Jul 30, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Aug 7, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Aug 7, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Oct 15, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
marc-vanderwal
added a commit
to marc-vanderwal/zonemaster-engine
that referenced
this pull request
Oct 16, 2025
Rewriting this test file to use the DSL helped me find a typo in the original t/Test-basic02.t file that caused the GOOD-2 scenario to point to good-1.basic02.xa instead of good-2.basic02.xa (see PR zonemaster#1465). It’s a good demonstration of why it can be important to design data structures and formats in such a way that internal repetition is avoided unless absolutely necessary: when done right, it makes subtle errors like these more obvious.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR fixes a typo in the
t/test-Basic02.tfile that caused one of the scenarios, GOOD-2, not to be tested at all.The scenario GOOD-2 erroneously pointed to the test zone named
good-1.basic02.xa, where it should have pointed togood-2.basic02.xa.Context
Issue found during refactoring.
Changes
t/test-Basic02.t;.datafile.How to test this PR
Unit tests should pass.