summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selftest/target/Samba4.pm4
-rw-r--r--source4/scripting/python/samba/tests/dns.py38
-rwxr-xr-xsource4/selftest/tests.py3
3 files changed, 23 insertions, 22 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index f1f2e17aab..da4b626791 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -1184,7 +1184,7 @@ sub provision_dc($$)
print "PROVISIONING DC...";
my $extra_conf_options = "netbios aliases = localDC1-a
-allow dns updates = True";
+allow dns updates = signed";
my $ret = $self->provision($prefix,
"domain controller",
"localdc",
@@ -1243,7 +1243,7 @@ sub provision_fl2003dc($$)
"samba2003.example.com",
"2003",
"locDCpass6",
- undef, "", "", 1);
+ undef, "allow dns updates = True", "", 1);
unless($self->add_wins_config("$prefix/private")) {
warn("Unable to add wins configuration");
diff --git a/source4/scripting/python/samba/tests/dns.py b/source4/scripting/python/samba/tests/dns.py
index aa6a4e6028..8815474061 100644
--- a/source4/scripting/python/samba/tests/dns.py
+++ b/source4/scripting/python/samba/tests/dns.py
@@ -82,7 +82,7 @@ class DNSTest(TestCase):
"Helper to get dns domain"
return os.getenv('REALM', 'example.com').lower()
- def dns_transaction_udp(self, packet, host=os.getenv('DC_SERVER_IP')):
+ def dns_transaction_udp(self, packet, host=os.getenv('SERVER_IP')):
"send a DNS query and read the reply"
s = None
try:
@@ -96,7 +96,7 @@ class DNSTest(TestCase):
if s is not None:
s.close()
- def dns_transaction_tcp(self, packet, host=os.getenv('DC_SERVER_IP')):
+ def dns_transaction_tcp(self, packet, host=os.getenv('SERVER_IP')):
"send a DNS query and read the reply"
s = None
try:
@@ -118,7 +118,7 @@ class TestSimpleQueries(DNSTest):
p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
questions = []
- name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
q = self.make_name_question(name, dns.DNS_QTYPE_A, dns.DNS_QCLASS_IN)
print "asking for ", q.name
questions.append(q)
@@ -129,14 +129,14 @@ class TestSimpleQueries(DNSTest):
self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
self.assertEquals(response.ancount, 1)
self.assertEquals(response.answers[0].rdata,
- os.getenv('DC_SERVER_IP'))
+ os.getenv('SERVER_IP'))
def test_one_a_query_tcp(self):
"create a query packet containing one query record via TCP"
p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
questions = []
- name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
q = self.make_name_question(name, dns.DNS_QTYPE_A, dns.DNS_QCLASS_IN)
print "asking for ", q.name
questions.append(q)
@@ -147,14 +147,14 @@ class TestSimpleQueries(DNSTest):
self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
self.assertEquals(response.ancount, 1)
self.assertEquals(response.answers[0].rdata,
- os.getenv('DC_SERVER_IP'))
+ os.getenv('SERVER_IP'))
def test_two_queries(self):
"create a query packet containing two query records"
p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
questions = []
- name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
q = self.make_name_question(name, dns.DNS_QTYPE_A, dns.DNS_QCLASS_IN)
questions.append(q)
@@ -171,7 +171,7 @@ class TestSimpleQueries(DNSTest):
p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
questions = []
- name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
q = self.make_name_question(name, dns.DNS_QTYPE_ALL, dns.DNS_QCLASS_IN)
print "asking for ", q.name
questions.append(q)
@@ -180,7 +180,7 @@ class TestSimpleQueries(DNSTest):
response = self.dns_transaction_udp(p)
num_answers = 1
- dc_ipv6 = os.getenv('DC_SERVER_IPV6')
+ dc_ipv6 = os.getenv('SERVER_IPV6')
if dc_ipv6 is not None:
num_answers += 1
@@ -188,7 +188,7 @@ class TestSimpleQueries(DNSTest):
self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
self.assertEquals(response.ancount, num_answers)
self.assertEquals(response.answers[0].rdata,
- os.getenv('DC_SERVER_IP'))
+ os.getenv('SERVER_IP'))
if dc_ipv6 is not None:
self.assertEquals(response.answers[1].rdata, dc_ipv6)
@@ -197,7 +197,7 @@ class TestSimpleQueries(DNSTest):
p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
questions = []
- name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
q = self.make_name_question(name, dns.DNS_QTYPE_ALL, dns.DNS_QCLASS_NONE)
questions.append(q)
@@ -212,7 +212,7 @@ class TestSimpleQueries(DNSTest):
# p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
# questions = []
#
-# name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+# name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
# q = self.make_name_question(name, dns.DNS_QTYPE_SOA, dns.DNS_QCLASS_IN)
# questions.append(q)
#
@@ -245,7 +245,7 @@ class TestDNSUpdates(DNSTest):
p = self.make_name_packet(dns.DNS_OPCODE_UPDATE)
updates = []
- name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
u = self.make_name_question(name, dns.DNS_QTYPE_A, dns.DNS_QCLASS_IN)
updates.append(u)
@@ -283,7 +283,7 @@ class TestDNSUpdates(DNSTest):
prereqs = []
r = dns.res_rec()
- r.name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ r.name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
r.rr_type = dns.DNS_QTYPE_TXT
r.rr_class = dns.DNS_QCLASS_NONE
r.ttl = 1
@@ -310,7 +310,7 @@ class TestDNSUpdates(DNSTest):
#
# prereqs = []
# r = dns.res_rec()
-# r.name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+# r.name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
# r.rr_type = dns.DNS_QTYPE_TXT
# r.rr_class = dns.DNS_QCLASS_ANY
# r.ttl = 0
@@ -488,7 +488,7 @@ class TestComplexQueries(DNSTest):
r.rr_class = dns.DNS_QCLASS_IN
r.ttl = 900
r.length = 0xffff
- r.rdata = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ r.rdata = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
updates.append(r)
p.nscount = len(updates)
p.nsrecs = updates
@@ -514,7 +514,7 @@ class TestComplexQueries(DNSTest):
r.rr_class = dns.DNS_QCLASS_NONE
r.ttl = 0
r.length = 0xffff
- r.rdata = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ r.rdata = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
updates.append(r)
p.nscount = len(updates)
p.nsrecs = updates
@@ -539,10 +539,10 @@ class TestComplexQueries(DNSTest):
self.assertEquals(response.ancount, 2)
self.assertEquals(response.answers[0].rr_type, dns.DNS_QTYPE_CNAME)
self.assertEquals(response.answers[0].rdata, "%s.%s" %
- (os.getenv('DC_SERVER'), self.get_dns_domain()))
+ (os.getenv('SERVER'), self.get_dns_domain()))
self.assertEquals(response.answers[1].rr_type, dns.DNS_QTYPE_A)
self.assertEquals(response.answers[1].rdata,
- os.getenv('DC_SERVER_IP'))
+ os.getenv('SERVER_IP'))
if __name__ == "__main__":
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index cf242e3670..b7b9d45abd 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -295,7 +295,8 @@ for f in sorted(os.listdir(os.path.join(samba4srcdir, "../pidl/tests"))):
planperltestsuite("pidl.%s" % f[:-3], os.path.normpath(os.path.join(samba4srcdir, "../pidl/tests", f)))
# DNS tests
-planpythontestsuite("dc", "samba.tests.dns")
+planpythontestsuite("fl2003dc", "samba.tests.dns")
+
# Local tests
for t in smb4torture_testsuites("dlz_bind9."):
#The dlz_bind9 tests needs to look at the DNS database