samba.tests.dsdb is not idempotent
Andrew Bartlett
abartlet at samba.org
Fri Nov 24 18:57:49 UTC 2017
On Fri, 2017-11-24 at 16:02 +0100, Andreas Schneider wrote:
> Hi Lumír,
>
> the attached patch cleans up the tests and creates a temporary user instead of
> tainting the Administrator account!
>
> This should fix your problem.
>
>
> Could a Samba Team member please review the patch and push if OK?
The only part I don't like is the fixed password. While fine here, I
think it is a habit we should avoid.
diff --git a/python/samba/tests/dsdb.py b/python/samba/tests/dsdb.py
index d35f3bb..493ea25 100644
--- a/python/samba/tests/dsdb.py
+++ b/python/samba/tests/dsdb.py
@@ -45,7 +45,7 @@ class DsdbTests(TestCase):
# Create a test user
user_name = "samdb-testuser"
- user_pass = "1qazXS at W"
+ user_pass = samba.generate_random_password(32, 32)
user_description = "Test user for dsdb test"
base_dn = self.samdb.domain_dn()
If you are OK with the amended patch, then I or you can push it.
Thanks!
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-tests-Create-a-test-user-for-the-dsdb-test.patch
Type: text/x-patch
Size: 7859 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171125/084ff857/0001-python-tests-Create-a-test-user-for-the-dsdb-test.bin>
More information about the samba-technical
mailing list