]> 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)
committerMichał Kępień <michal@isc.org>
Tue, 8 May 2018 10:26:53 +0000 (12:26 +0200)
commitbfbeef3609dba1929e3df4ab980291a56387006a
tree794abba4b62038e858c1250516244371ee548f0e
parentdc1ac23b9ff1366b37f2fa8b6c9f9de7b1945b22
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.
lib/dns/tests/dnstest.c
lib/dns/tests/dnstest.h
lib/dns/tests/zt_test.c