Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
The PowerDNS Source repository includes different types of regression tests.
Authoritative tests, backend specific
To add tests, head on to pdns/regression-tests and study the contents of the directories under
tests. To add a new one, simply generate a directory for it, a 'command' file and a 'description' file.
To run the regression tests, run the following in the regression-tests directory:
nameserver=127.0.0.1 port=5300 ./runtests
You'll now find a
real_result file in your new directory. Check if the results are ok, and if so, copy this file to expected_result. Run the tests again, and you'll see them reported as a success this time.
The syntax above expects a PowerDNS running on port 5300, btw. You need to start powerdns with the named.conf as found in the regression-tests directory, or feed it through
zone2sql if you want to test the sql backends.
https://raw.githubusercontent.com/PowerDNS/pdns/master/regression-tests/README.md has current information on running tests.
When you write new tests, please open a pull request with your changes.
sdig is not a
dig replacement, but it does always generate the exact same output, even if the bind people add new features or change their layout. I have no beef with them, my and their needs are just different.
make sdig (requires the
boost C++ header files).
sdig can be run as follows:
$ sdig 127.0.0.1 5300 example.com ANY
As it is not really meant for human use, the query type at the end is case sensitive! You also can't omit any parameters.