Version 1 (modified by ahu, 8 years ago)

--

The regression tests

These have been unused for over 3 years.. But they are back! There are 22 tests and you are welcome to write more, many more!

Running these tests in fact caught three problems in the bind2backend, which proves they are a good thing.

To add tests, head on to pdns/regression-tests and study the contents of the 22 test directories. 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.

We need new tests for LOC, HINFO, RP and all other 'rare' records.

The regression tests used to depend on a very specific version of 'dig', which is no longer easily available, so I've written..

sdig

'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.

To compile 'sdig', run 'make sdig', but do note that this requires the 'boost' c++ header files. These are available for debian, red hat, etc etc.