]> git.ipfire.org Git - thirdparty/bind9.git/commit
Rework dns_test_makezone()
authorMichał Kępień <michal@isc.org>
Tue, 13 Mar 2018 13:06:04 +0000 (14:06 +0100)
committerEvan Hunt <each@isc.org>
Thu, 10 May 2018 16:42:13 +0000 (09:42 -0700)
commitc7d9100dcb4c93bb9a08166a8ef0bce3f28bdaf8
treef68ddf3afb7e2e0a120c536fbdf4ed923446f4f4
parenta1e279669b47da6e9a3c02e0c2dee7bd32b2e3de
Rework dns_test_makezone()

The dns_test_makezone() helper function always assigns the created zone
to some view, which is not always necessary and complicates cleanup of
non-managed zones as they are required not to be assigned to any view.

Rework dns_test_makezone() in order to make it easier to use in unit
tests operating on non-managed zones.  Use dns_name_fromstring() instead
of dns_name_fromtext() to simplify code.  Do not use the CHECK() macro
and add comments to make code flow simpler to follow.  Use
dns_test_makeview() instead of dns_view_create().

Adjust existing unit tests using this function so that they still pass.

(cherry picked from commit bfbeef3609dba1929e3df4ab980291a56387006a)
(cherry picked from commit f70c02d2c2a7fe23e045dabe61ff964170ed2f1a)
(cherry picked from commit d45ee39baed24e3d55dfaeb41f26866b2f5d61f1)
(cherry picked from commit d76fdb871897eb82de04a11a55655fa2a209b32c)
lib/dns/tests/dnstest.c
lib/dns/tests/dnstest.h
lib/dns/tests/zt_test.c