mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
python:tests/dns_base: pass tkey_trans(expected_rcode)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13019 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 27d92fa808c6617353c36fdb230504e880f4925b)
This commit is contained in:
parent
e58fe90837
commit
8578485462
@ -249,7 +249,8 @@ class DNSTKeyTest(DNSTest):
|
||||
self.newrecname = "tkeytsig.%s" % self.get_dns_domain()
|
||||
|
||||
def tkey_trans(self, creds=None, algorithm_name="gss-tsig",
|
||||
tkey_req_in_answers=False):
|
||||
tkey_req_in_answers=False,
|
||||
expected_rcode=dns.DNS_RCODE_OK):
|
||||
"Do a TKEY transaction and establish a gensec context"
|
||||
|
||||
if creds is None:
|
||||
@ -307,6 +308,9 @@ class DNSTKeyTest(DNSTest):
|
||||
|
||||
(response, response_packet) =\
|
||||
self.dns_transaction_tcp(p, self.server_ip)
|
||||
if expected_rcode != dns.DNS_RCODE_OK:
|
||||
self.assert_echoed_dns_error(p, response, response_packet, expected_rcode)
|
||||
return
|
||||
self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK)
|
||||
|
||||
tkey_record = response.answers[0].rdata
|
||||
|
Loading…
x
Reference in New Issue
Block a user