Repository navigation
Conversation
Member
Author
|
This is a draft for now as it will require most likely more work to make it work in pipeline. It works locally for me but I'm not expecting CI to work the same... |
bukka
force-pushed
the
dns-test
branch
8 times, most recently
from
June 23, 2025 15:38
d371d31 to
c74de14
Compare
bukka
force-pushed
the
dns-test
branch
3 times, most recently
from
July 18, 2025 16:18
7b35d37 to
897932f
Compare
bukka
force-pushed
the
dns-test
branch
4 times, most recently
from
July 28, 2025 14:52
2cf5f75 to
e0b8cf0
Compare
bukka
force-pushed
the
dns-test
branch
3 times, most recently
from
September 3, 2025 13:49
10f828d to
6038793
Compare
This creates a test framework for testing PHP DNS functions that were previously completely untested. It provides scripts for starting a BIND 9 server that serves locally defined zone files, which can be used for creating specific test scenarios without the need to rely on online data. The PHP DNS functions use libresolv which reads /etc/resolv.conf, so the resolv-setup.sh script replaces that file with one pointing to the local BIND server (keeping the previous nameservers as a fallback) instead of configuring systemd-resolved, which re-applies DHCP servers and routes queries per link and therefore did not work reliably in CI. BIND forwards all other queries to the original upstream nameservers so the rest of the system keeps resolving. This is all used in the GitHub Actions Linux jobs.
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.
This creates a test framework for testing PHP DNS functions that are currently completely untested. It provides scripts for starting a BIND 9 DNS server that serves locally defined zone files. Those can then be used for creating specific test scenarios without a need to rely on online data. This is all used in the GitHub Actions Linux jobs.
The PHP DNS functions use libresolv which reads
/etc/resolv.confdirectly, soresolv-setup.shreplaces that file with one pointing to the local BIND server (keeping the previous nameservers as a fallback) instead of configuring systemd-resolved, which re-applies DHCP servers and routes queries per link and therefore did not work reliably in CI. BIND forwards all other queries to the original upstream nameservers so the rest of the system keeps resolving. Seeext/standard/tests/dns/README.mdfor local usage.The target branch is set to PHP-8.4 because this is meant to be used for testing of bug fixes.