[SCM] Samba Shared Repository - branch master updated
Noel Power
npower at samba.org
Mon Nov 22 11:19:01 UTC 2021
The branch, master has been updated
via b5e0f33e829 pytest/docs: better spelling of set_smbconf_arbitrary
via b674c57a182 pytest/docs: set_smbconf_arbitrary_opposite() needs param_type
via 5bbf105937c pytest/dns_aging: remove duplicate tests
via 524ca3c6d23 pytest/dns_aging: use correct variable names
via b5e2651f1ca py/dnsserver: add a missing exception variable
via 3c18bb6c77d py/dnsserver: add missing imports
from 1926335839a third_party/update: forget pep8
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b5e0f33e8296d6312efadd8a78d752b788d66f54
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Nov 19 16:16:30 2021 +1300
pytest/docs: better spelling of set_smbconf_arbitrary
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Noel Power <npower at samba.org>
Autobuild-User(master): Noel Power <npower at samba.org>
Autobuild-Date(master): Mon Nov 22 11:18:09 UTC 2021 on sn-devel-184
commit b674c57a1829365f50bfdf846ca609d4ac205e52
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Nov 19 16:15:50 2021 +1300
pytest/docs: set_smbconf_arbitrary_opposite() needs param_type
also, we fixed the name ("arbitrary", not "arbitary").
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Noel Power <npower at samba.org>
commit 5bbf105937cd94a09abe550297aa0d366aa839e1
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Nov 19 16:13:39 2021 +1300
pytest/dns_aging: remove duplicate tests
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Noel Power <npower at samba.org>
commit 524ca3c6d23323a67fad36e39f5e05f893c44a80
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Nov 19 16:12:43 2021 +1300
pytest/dns_aging: use correct variable names
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit b5e2651f1ca99a8a654f60767a40f9228413437b
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Nov 19 16:21:08 2021 +1300
py/dnsserver: add a missing exception variable
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Noel Power <npower at samba.org>
commit 3c18bb6c77d33b000489c6b4bd1dd87b81f2162f
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Nov 19 16:11:14 2021 +1300
py/dnsserver: add missing imports
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Noel Power <npower at samba.com>
-----------------------------------------------------------------------
Summary of changes:
python/samba/dnsserver.py | 3 ++-
python/samba/tests/dns_aging.py | 16 ++--------------
python/samba/tests/docs.py | 10 ++++++----
3 files changed, 10 insertions(+), 19 deletions(-)
Changeset truncated at 500 lines:
diff --git a/python/samba/dnsserver.py b/python/samba/dnsserver.py
index 0170dc23efb..86a2a6ceaf2 100644
--- a/python/samba/dnsserver.py
+++ b/python/samba/dnsserver.py
@@ -19,6 +19,7 @@
import shlex
import socket
from samba.dcerpc import dnsserver, dnsp
+from samba import WERRORError, werror
# Note: these are not quite the same as similar looking classes in
# provision/sambadns.py -- those ones are based on
@@ -296,7 +297,7 @@ def flag_from_string(rec_type):
rtype = rec_type.upper()
try:
return getattr(dnsp, 'DNS_TYPE_' + rtype)
- except AttributeError:
+ except AttributeError as e:
raise DNSParseError('Unknown type of DNS record %s' % rec_type) from e
diff --git a/python/samba/tests/dns_aging.py b/python/samba/tests/dns_aging.py
index 2e7369bed00..4818451f789 100644
--- a/python/samba/tests/dns_aging.py
+++ b/python/samba/tests/dns_aging.py
@@ -2146,7 +2146,7 @@ class TestDNSAging(DNSTest):
# D is scavengeable
atime = self.dns_update_record(A, A).dwTimeStamp
btime = self.ldap_update_record(B, B, dwTimeStamp=now-20).dwTimeStamp
- btime = self.ldap_update_record(C, C, dwTimeStamp=now-40).dwTimeStamp
+ ctime = self.ldap_update_record(C, C, dwTimeStamp=now-40).dwTimeStamp
dtime = self.ldap_update_record(D, D, dwTimeStamp=now-60).dwTimeStamp
self.assert_soon_after(atime, now)
self.assert_timestamps_equal(btime, now-20)
@@ -2158,7 +2158,7 @@ class TestDNSAging(DNSTest):
# D should be gone (tombstoned)
r = self.get_unique_txt_record(D, D)
self.assertIsNone(r)
- r = dns_query(self, D, qtype=dns.DNS_QTYPE_TXT)
+ r = self.dns_query(D, qtype=dns.DNS_QTYPE_TXT)
self.assertEqual(r.ancount, 0)
recs = self.ldap_get_records(D)
self.assertEqual(len(recs), 1)
@@ -2552,12 +2552,6 @@ class TestDNSAging(DNSTest):
def test_dns_delete_simple_112_113_days_no_aging(self):
self._test_dns_delete_simple(112, 113, False)
- def test_dns_delete_simple_112_113_days_aging(self):
- self._test_dns_delete_simple(112, 113, True)
-
- def test_dns_delete_simple_112_113_days_no_aging(self):
- self._test_dns_delete_simple(112, 113, False)
-
def test_dns_delete_simple_0_113_days_aging(self):
# 1e9 hours ago evaluates to 0, i.e static
self._test_dns_delete_simple(1e9, 113, True)
@@ -2601,12 +2595,6 @@ class TestDNSAging(DNSTest):
def test_dns_delete_simple_112_113_days_no_aging_touch(self):
self._test_dns_delete_simple(112, 113, False, True)
- def test_dns_delete_simple_112_113_days_aging_touch(self):
- self._test_dns_delete_simple(112, 113, True, True)
-
- def test_dns_delete_simple_112_113_days_no_aging_touch(self):
- self._test_dns_delete_simple(112, 113, False, True)
-
def test_dns_delete_simple_0_113_days_aging_touch(self):
# 1e9 hours ago evaluates to 0, i.e static
self._test_dns_delete_simple(1e9, 113, True, True)
diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index 995b8e09978..f143f923d64 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -62,7 +62,7 @@ def check_or_set_smbconf_default(cmdline, topdir, param, default_param):
return None
-def set_smbconf_arbitary(cmdline, topdir, param, param_type, value_to_use):
+def set_smbconf_arbitrary(cmdline, topdir, param, param_type, value_to_use):
p = subprocess.Popen(cmdline,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
@@ -86,7 +86,8 @@ def set_smbconf_arbitary(cmdline, topdir, param, param_type, value_to_use):
return None
-def set_smbconf_arbitary_opposite(cmdline, topdir, tempdir, section, param, opposite_value, value_to_use):
+def set_smbconf_arbitrary_opposite(cmdline, topdir, tempdir, section, param,
+ param_type, opposite_value, value_to_use):
g = tempfile.NamedTemporaryFile(mode='w', dir=tempdir, delete=False)
try:
towrite = section + "\n"
@@ -452,7 +453,7 @@ class SmbDotConfTests(TestCase):
"--option",
"%s = %s" % (param, value_to_use)]
- future = executor.submit(set_smbconf_arbitary, cmdline, self.topdir, param, param_type, value_to_use)
+ future = executor.submit(set_smbconf_arbitrary, cmdline, self.topdir, param, param_type, value_to_use)
result_futures1.append(future)
opposite_value = opposite_arbitrary.get(param_type)
@@ -461,7 +462,8 @@ class SmbDotConfTests(TestCase):
"--option",
"%s = %s" % (param, value_to_use)]
- future = executor.submit(set_smbconf_arbitary_opposite, cmdline, self.topdir, self.tempdir, section, param, opposite_value, value_to_use)
+ future = executor.submit(set_smbconf_arbitrary_opposite, cmdline, self.topdir, self.tempdir,
+ section, param, param_type, opposite_value, value_to_use)
result_futures2.append(future)
for f in concurrent.futures.as_completed(result_futures1):
--
Samba Shared Repository
More information about the samba-cvs
mailing list