summaryrefslogtreecommitdiff
path: root/python/samba/tests/samba_tool/group.py
AgeCommit message (Collapse)AuthorFilesLines
2025-08-20pytest:samba-tool group: remove unused importsDouglas Bagnall1-5/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Aug 20 05:35:03 UTC 2025 on atb-devel-224
2025-06-16pytest: samba-tool group: test with 16 character nameDouglas Bagnall1-1/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15854 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Björn Baumbach <bb@samba.org>
2025-06-16pytest:samba-tool group: test addmembersDouglas Bagnall1-0/+14
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15854 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Björn Baumbach <bb@samba.org>
2024-08-04python:tests: Remove unused variableJo Sutton1-1/+1
assertMatch() returns None, which isn’t very useful. Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
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]
2023-11-30python: PEP275: docstrings should always use double quotesRob 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>
2023-02-23python: fix mutable default argumentsRob van der Linde1-1/+3
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 23 23:33:46 UTC 2023 on atb-devel-224
2023-02-20python:tests: Make sure we delete the OU for movetestAndreas Schneider1-5/+3
UNEXPECTED(failure): samba.tests.samba_tool.group.samba.tests.samba_tool.group.GroupCmdTestCase.test_move(ad_dc_default:local) REASON: Exception: Exception: Traceback (most recent call last): File "python/samba/tests/samba_tool/group.py", line 341, in test_move self.assertCmdSuccess(result, out, err) File "python/samba/tests/samba_tool/base.py", line 97, in assertCmdSuccess self.assertIsNone(exit, msg=msg.replace("\n]\n", "\n] \n")) AssertionError: -1 is not None : exit[-1] stdout[] stderr[ERROR(ldb): Failed to add ou "OU=movetest,DC=addom,DC=samba,DC=example,DC=com" - Entry OU=movetest,DC=addom,DC=samba,DC=example,DC=com already exists BUG: https://bugzilla.samba.org/show_bug.cgi?id=15308 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-01-15samba-tool: Optionally hide disabled/expired accounts in "group listmembers"Björn Baumbach1-0/+109
--hide-expired Do not list expired group members --hide-disabled Do not list disabled group members Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jan 15 16:34:11 UTC 2021 on sn-devel-184
2020-10-01samba-tool tests: rename 'group create' to 'group add'Jule Anger1-1/+1
Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01samba-tool tests: rename 'ou create' to 'ou add'Jule Anger1-2/+2
Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01samba-tool tests: add test-cases for 'group rename'Jule Anger1-0/+75
Tests the following options: --samaccountname --force-new-cn --reset-cn --mail-address Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-02-28selftest: test samba-tool group commands with groupnames with brackets and ↵Björn Baumbach1-0/+3
spaces BUG: https://bugzilla.samba.org/show_bug.cgi?id=14296 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-07pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall1-11/+11
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>
2020-01-21samba-tool tests: add test-case for 'group list --base-dn'Jule Anger1-0/+22
Check if the group list --base-dn / -b command uses a specific base dn. Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-21samba-tool tests: add test-case for 'group listmembers --full-dn'Jule Anger1-0/+23
Check if the group listmembers --full-dn command displays DN instead of the sAMAccountName. Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-21samba-tool tests: Add test-case for 'group list --full-dn'Jule Anger1-0/+21
Check if the --full-dn option displays DN instead of the sAMAccountName. Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2019-12-20selftest: make ad_dc_default an alias for ad_dc, not ad_dc_ntvfsRalph Boehme1-1/+1
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-10-17samba-tool: Add facility to add rfc2307 attributes to an already created ↵Rowland Penny1-5/+97
user or group Signed-off-by: Rowland Penny <rpenny@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Oct 17 12:21:55 UTC 2019 on sn-devel-184
2019-05-06selftest: correcting empty attribute usage in requestsAaron Haslett1-2/+1
Many parts of Samba use an empty attribute list in requests expecting all attributes to be returned in the response, which is incorrect. This patch corrects the instances found by current CI tests. Static analysis and debugging will need to be done before changing ildap to the correct semantics. Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Mon May 6 05:45:55 UTC 2019 on sn-devel-184
2018-12-04tests: Add test-case for 'group list --verbose'Tim Beale1-0/+41
Check that the number of members reported is correct. (This change somehow got left off the ca570bd4827aa commit that was actually delivered). Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-31netcmd: Add 'samba-tool group stats' commandTim Beale1-0/+18
With large domains it's hard to get an idea of how many groups there are, and how many users are in each group, on average. However, this could have a big impact on whether a problem can be reproduced or not. This patch dumps out some summary information so that you can get a quick idea of how big the groups are. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Oct 31 03:40:41 CET 2018 on sn-devel-144
2018-09-06PEP8: fix E127: continuation line over-indented for visual indentJoe Guo1-4/+4
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-03python/sambe/tests/samba_tool: PY3 port for tests.samba_tool.groupNoel Power1-2/+2
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-24PEP8: fix E303: too many blank lines (2)Joe Guo1-2/+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/+1
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 E231: missing whitespace after ','Joe Guo1-2/+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-08-24PEP8: fix E222: multiple spaces after operatorJoe Guo1-3/+3
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 E128: continuation line under-indented for visual indentJoe Guo1-4/+4
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 E123: closing bracket does not match indentation of opening ↵Joe Guo1-1/+1
bracket's line 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-05-29python/samba/netcmd/group.py: add group showWilliam Brown1-0/+10
The samba-tool user command can show the ldif of a user. This is useful for groups also, especially to determine the objectSID and objectGUID. Add support for group show to samba-tool. Signed-off-by: William Brown <william@blackhats.net.au> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-02-08tests/samba-tool: add tests for samba-tool group move commandBjörn Baumbach1-0/+32
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-08-04tests:samba_tool: pass stdout and stderr to assertCmdSuccess()Stefan Metzmacher1-5/+5
This allows us to generate better assert messages and give the developer some ideas why the command wasn't able to run. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12108 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij1-0/+169
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