summaryrefslogtreecommitdiff
path: root/python/samba/tests/samdb.py
AgeCommit message (Collapse)AuthorFilesLines
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/samdb: use TestCaseInTempDir.rm_files/.rm_dirsDouglas Bagnall1-6/+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-11-11samdb: Add samdb.domain_netbios_name()Andrew Bartlett1-3/+10
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-10-25python/tests/samdb: avoid useless local variableDouglas Bagnall1-1/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-10-25python/tests/*: remove unused importsDouglas Bagnall1-1/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-06-28provision: set 'binddns dir' when making new smb.confTim Beale1-1/+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-12-08selftest: Rework samba.dsdb locking test to samba.dsdb_lockAndrew Bartlett1-56/+25
This avoids running the test while samba is modifying and locking the same database, as this can lead to a deadlock. The deadlock is not seen in production as the LDB read lock is not held while waiting for another process, but this test needs to do this to demonstrate the locking safety. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Dec 8 21:47:55 CET 2017 on sn-devel-144
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij1-0/+96
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104