From: Douglas Bagnall Date: Fri, 11 Jun 2021 05:31:54 +0000 (+1200) Subject: pytest: dns_aging: remind developers to use fl2003 X-Git-Tag: tevent-0.11.0~310 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7d4fd98be0c3c200442cd61bfd0d4c75619394e;p=thirdparty%2Fsamba.git pytest: dns_aging: remind developers to use fl2003 By "developers", I of course mean "me". Other environments insist on secure updates, which these tests don't do. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/dns_aging.py b/python/samba/tests/dns_aging.py index 037f15b8ef5..619d6be69f0 100644 --- a/python/samba/tests/dns_aging.py +++ b/python/samba/tests/dns_aging.py @@ -337,6 +337,12 @@ class TestDNSAging(DNSTest): txt = [txt] p = self.make_txt_update(name, txt, self.zone, ttl=ttl) (code, response) = self.dns_transaction_udp(p, host=SERVER_IP) + if code.operation & dns.DNS_RCODE == dns.DNS_RCODE_REFUSED: + # sometimes you might forget this + print("\n\ngot DNS_RCODE_REFUSED\n") + print("Are you running this in the fl2003 environment?\n") + print("try `SELFTEST_TESTENV='fl2003dc:local' make testenv`\n\n") + self.assert_dns_rcode_equals(code, dns.DNS_RCODE_OK) return self.get_unique_txt_record(name, txt)