From: Chris Hofstaedtler Date: Mon, 10 May 2021 08:15:33 +0000 (+0200) Subject: test-auth-domaincache_cc: check zoneId value explicitly X-Git-Tag: auth-4.5.0-alpha1~7^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9da243a3e17a53beb8478d6c2ca7eb14a9416d63;p=thirdparty%2Fpdns.git test-auth-domaincache_cc: check zoneId value explicitly --- diff --git a/pdns/test-auth-domaincache_cc.cc b/pdns/test-auth-domaincache_cc.cc index b19ccd88ed..c013d319e7 100644 --- a/pdns/test-auth-domaincache_cc.cc +++ b/pdns/test-auth-domaincache_cc.cc @@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(test_replace) { int zoneId = 0; bool found = cache.getEntry(DNSName("example.org."), zoneId); - if (!found || zoneId == 0) { + if (!found || zoneId != 1) { BOOST_FAIL("domain added in replace() not found"); } } @@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(test_add_while_pending_replace) { int zoneId = 0; bool found = cache.getEntry(DNSName("example.org."), zoneId); - if (!found || zoneId == 0) { + if (!found || zoneId != 2) { BOOST_FAIL("domain added while replace was pending not found"); } }