summaryrefslogtreecommitdiff
path: root/python/samba/tests/dns_aging.py
AgeCommit message (Collapse)AuthorFilesLines
2023-08-30pytest/dns_aging: Assert that the name of the node to search for is a stringJoseph Sutton1-0/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30pytest/dns_aging: Correctly check that record is tombstonedJoseph Sutton1-5/+5
We were passing in as the name parameter to assert_tombstoned() an NDR Python object, rather than a string. This meant that the LDAP search filter would look something like this: (&(objectClass=dnsNode)(name=<dnsp.DnssrvRpcRecord talloc based object at 0x29abee0>)) and we would fail to find any records. These searches should have a better chance of working if we pass in the name of the record instead. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30pytest/dns_aging: Check value of ‘dtime’Joseph Sutton1-0/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30python: Remove unused importsJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30python: Fix spellingJoseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-23python:samba:tests: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-11-22pytest/dns_aging: remove duplicate testsDouglas Bagnall1-12/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2021-11-22pytest/dns_aging: use correct variable namesDouglas Bagnall1-2/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2021-06-22pytest: dns_aging: do not insist on non-aging timestamp updatesDouglas Bagnall1-2/+6
With Windows, when aging is off, the record timestamps are updated anyway, but the timestamp change is not replicated. We are not going to do it like that. With aging off, our records will keep their first timestamp. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22pytest: dns_aging sibling test fails on windowsDouglas Bagnall1-2/+13
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22pytest dns_aging: add windows_variationDouglas Bagnall1-1/+13
We want to sometimes be able to say "we know Windows fails, it fails like this, it is OK", so that when we run the tests on Windows we know the failures are not unexpected. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22pytest: dns_aging: fix two tests (bad arithmetic)Douglas Bagnall1-11/+11
oops. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22pytest dns_aging: add sibling testsDouglas Bagnall1-0/+132
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22pytest dns_aging: add simple delete testsDouglas Bagnall1-0/+131
When records are added and deleted and added again, Windows gets all kinds of ideas about what should happen, and many of our tests explore that. Here we focus the simplest case with a variety of timestamp combinations. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22pytest: dns_aging: test delete multiple recordsDouglas Bagnall1-3/+88
Using dns.DNS_QCLASS_ANY we can delete all the records of a certain type. What happens to other timestamps? The answer should be nothing. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22pytest: dns_aging: test RPC updates of disparate typesDouglas Bagnall1-1/+16
Can a TXT record be replaced by an A record in an RPC update? According to Windows, yes. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest dns_aging: test tombstone timestamp rangesDouglas Bagnall1-1/+56
We have always used hours where we are meant to use NTTIME. Let's make sure we don't break old tombstones. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: remove a test that fails on WindowsDouglas Bagnall1-42/+0
This fails on Windows due to apparent races between the RPC, DNS, and LDAP servers. There is no point having it sit there doing nothing. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: add Samba-specific scavenging testDouglas Bagnall1-0/+85
We can't make scavenging happen on demand on Windows, so we just concentrate on Samba here. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: try queries of recently tombstoned nodesDouglas Bagnall1-0/+16
Windows fails this one. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging tests deletions using DNS updateDouglas Bagnall1-0/+95
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: remove/fix unused helper functionsDouglas Bagnall1-8/+6
self.rpc_delete_txt() will be used next commit. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: helper to get non-tombstoned recordsDouglas Bagnall1-0/+8
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: add helper for DNS delete updatesDouglas Bagnall1-0/+6
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: correct typo mis-assertions in 2 testsDouglas Bagnall1-2/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: remind developers to use fl2003Douglas Bagnall1-0/+6
By "developers", I of course mean "me". Other environments insist on secure updates, which these tests don't do. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: dns_aging: use assert_timestamps_equal() widelyDouglas Bagnall1-110/+110
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: add A and AAAA aging testsDouglas Bagnall1-1/+121
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytest: adjust dns_aging to handle some non-TXT recordsDouglas Bagnall1-11/+120
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-20pytests: dns_aging get informative assertionsDouglas Bagnall1-2/+47
When trying to understand the results of these tests, it is not very helpful to have messages like: AssertionError: 3685511 != 3685343 when the only thing you want to know is the difference between these two numbers. So here we make timestamp specific assertions. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-11pytests: add dns_aging, embracing and extending ageing testsDouglas Bagnall1-0/+1895
This incorporates tests from various dns*.py files, but makes them correct. All but one of these tests pass against Windows 2012r2. Further patches will remove the broken tests in other files, and fix Samba so it passes these. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Jun 11 09:29:23 UTC 2021 on sn-devel-184