summaryrefslogtreecommitdiff
path: root/python/samba/tests/join.py
AgeCommit message (Collapse)AuthorFilesLines
2024-06-06python:tests/dns_base: maintain a dict with tkey related stateStefan Metzmacher1-1/+1
This will allow tests to backup the whole state and mix them. 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>
2023-11-30python: tests: update all super calls to python 3 style in testsRob van der Linde1-2/+2
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> [abartlet@samba.org Some python2 style super() calls remain due to being an actual, even if reasonable, behaviour change]
2022-09-06pytest/join: use TestCaseInTempDir.rm_files/dirsDouglas Bagnall1-4/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
2020-02-07pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall1-6/+6
TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2019-03-14tests: Make IPv4 assumption explicitTim Beale1-2/+3
This test is asserting the expected number of *IPv4* addresses, not any interface address (including IPv6). It works currently because the selftest client doesn't have an IPv6 address in its smb.conf. This patch makes the IPv4 assumption explicit by importing interface_ips_v4() from the provision code. We need to tweak this to pass through an 'all_interfaces' flag, otherwise it filters out the loopback IP addresses that the testenv is using. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-24PEP8: fix E303: too many blank lines (2)Joe Guo1-3/+0
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-07-03join: Rename dc_join() so it looks like an objectTim Beale1-6/+7
dc_join() is creating an object, but it currently looks like it's just a function call. Rename it to look more object-like. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-06-28provision: set 'binddns dir' when making new smb.confTim Beale1-0/+1
When creating a new smb.conf from scratch during a join/clone/etc, the 'binddns dir' setting still uses the source smb.conf/default setting, instead of the targetdir sub-directory. I noticed this problem when trying to create a new testenv - the provision() was trying to create /usr/local/samba/bind-dns directory, which would fail if samba hadn't already been installed on the host machine. Now that this is fixed, we also need to fix tests that were explicitly asserting that no unexpected directories were left behind after the test completes. This change also breaks the upgradeprovision script. The upgrade- provision calls newprovision() to create a reference provision in a temporary directory. However, previously this temporary provision was creating the bind-dns directory in the actual upgrade directory as a side-effect, e.g. it did a provision() with targetdir=alpha13_upgrade_full/private/referenceprovisionLBKBh2 and this ended up creating alpha13_upgrade_full/bind-dns as a side-effect. The provision() now creates bind-dns in the specified targetdir, but this means check_for_DNS() fails (it tries to create bind-dns sub- directories, but the upgrade's bind-dns doesn't exist). I've avoided this problem by making sure bind-dns exists as part of the check_for_DNS() processing. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-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): Thu Jun 28 06:22:16 CEST 2018 on sn-devel-144
2017-06-10selftest: Add test confirming join-created DNS entries can be modified as the DCAndrew Bartlett1-6/+68
This ensures that samba_dnsupdate can run in the long term against the new DNS entries Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-06-10selftest: Test join.py and confirm that the DNS record is createdAndrew Bartlett1-0/+113
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>