mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
samba-tool tests: rename 'ou create' to 'ou add'
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>
This commit is contained in:
committed by
Douglas Bagnall
parent
3b8ed676cc
commit
6315deaa67
@ -308,7 +308,7 @@ class ComputerCmdTestCase(SambaToolCmdTest):
|
||||
return self.runsubcmd('computer', 'create', *args)
|
||||
|
||||
def _create_ou(self, ou):
|
||||
return self.runsubcmd("ou", "create", "OU=%s" % ou["name"],
|
||||
return self.runsubcmd("ou", "add", "OU=%s" % ou["name"],
|
||||
"--description=%s" % ou["description"])
|
||||
|
||||
def _find_computer(self, name):
|
||||
|
@ -264,10 +264,10 @@ class GroupCmdTestCase(SambaToolCmdTest):
|
||||
|
||||
def test_move(self):
|
||||
full_ou_dn = str(self.samdb.normalize_dn_in_domain("OU=movetest"))
|
||||
(result, out, err) = self.runsubcmd("ou", "create", full_ou_dn)
|
||||
(result, out, err) = self.runsubcmd("ou", "add", full_ou_dn)
|
||||
self.assertCmdSuccess(result, out, err)
|
||||
self.assertEqual(err, "", "There shouldn't be any error message")
|
||||
self.assertIn('Created ou "%s"' % full_ou_dn, out)
|
||||
self.assertIn('Added ou "%s"' % full_ou_dn, out)
|
||||
|
||||
for group in self.groups:
|
||||
(result, out, err) = self.runsubcmd(
|
||||
|
@ -46,7 +46,7 @@ class OUCmdTestCase(SambaToolCmdTest):
|
||||
self.assertCmdSuccess(result, out, err)
|
||||
self.assertEqual(err, "", "There shouldn't be any error message")
|
||||
full_ou_dn = self.samdb.normalize_dn_in_domain("OU=%s" % ou["name"])
|
||||
self.assertIn('Created ou "%s"' % full_ou_dn, out)
|
||||
self.assertIn('Added ou "%s"' % full_ou_dn, out)
|
||||
|
||||
found = self._find_ou(ou["name"])
|
||||
|
||||
@ -71,10 +71,10 @@ class OUCmdTestCase(SambaToolCmdTest):
|
||||
# try to create all the ous again, this should fail
|
||||
for ou in self.ous:
|
||||
(result, out, err) = self._create_ou(ou)
|
||||
self.assertCmdFail(result, "Succeeded to create existing ou")
|
||||
self.assertCmdFail(result, "Succeeded to add existing ou")
|
||||
self.assertIn("already exists", err)
|
||||
|
||||
# try to delete all the ous we just created
|
||||
# try to delete all the ous we just added
|
||||
for ou in self.ous:
|
||||
(result, out, err) = self.runsubcmd("ou", "delete", "OU=%s" %
|
||||
ou["name"])
|
||||
@ -87,20 +87,20 @@ class OUCmdTestCase(SambaToolCmdTest):
|
||||
# test creating ous
|
||||
for ou in self.ous:
|
||||
(result, out, err) = self.runsubcmd(
|
||||
"ou", "create", "OU=%s" % ou["name"],
|
||||
"ou", "add", "OU=%s" % ou["name"],
|
||||
"--description=%s" % ou["description"])
|
||||
|
||||
self.assertCmdSuccess(result, out, err)
|
||||
self.assertEqual(err, "", "There shouldn't be any error message")
|
||||
full_ou_dn = self.samdb.normalize_dn_in_domain("OU=%s" % ou["name"])
|
||||
self.assertIn('Created ou "%s"' % full_ou_dn, out)
|
||||
self.assertIn('Added ou "%s"' % full_ou_dn, out)
|
||||
|
||||
found = self._find_ou(ou["name"])
|
||||
|
||||
self.assertEqual("%s" % found.get("ou"),
|
||||
"%s" % ou["name"])
|
||||
|
||||
# try to delete all the ous we just created (with full dn)
|
||||
# try to delete all the ous we just added (with full dn)
|
||||
for ou in self.ous:
|
||||
full_ou_dn = self.samdb.normalize_dn_in_domain("OU=%s" % ou["name"])
|
||||
(result, out, err) = self.runsubcmd("ou", "delete", str(full_ou_dn))
|
||||
@ -114,13 +114,13 @@ class OUCmdTestCase(SambaToolCmdTest):
|
||||
for ou in self.ous:
|
||||
full_ou_dn = self.samdb.normalize_dn_in_domain("OU=%s" % ou["name"])
|
||||
(result, out, err) = self.runsubcmd(
|
||||
"ou", "create", str(full_ou_dn),
|
||||
"ou", "add", str(full_ou_dn),
|
||||
"--description=%s" % ou["description"])
|
||||
|
||||
self.assertCmdSuccess(result, out, err)
|
||||
self.assertEqual(err, "", "There shouldn't be any error message")
|
||||
full_ou_dn = self.samdb.normalize_dn_in_domain("OU=%s" % ou["name"])
|
||||
self.assertIn('Created ou "%s"' % full_ou_dn, out)
|
||||
self.assertIn('Added ou "%s"' % full_ou_dn, out)
|
||||
|
||||
found = self._find_ou(ou["name"])
|
||||
|
||||
@ -273,7 +273,7 @@ class OUCmdTestCase(SambaToolCmdTest):
|
||||
return ou
|
||||
|
||||
def _create_ou(self, ou):
|
||||
return self.runsubcmd("ou", "create", "OU=%s" % ou["name"],
|
||||
return self.runsubcmd("ou", "add", "OU=%s" % ou["name"],
|
||||
"--description=%s" % ou["description"])
|
||||
|
||||
def _find_ou(self, name):
|
||||
|
@ -456,10 +456,10 @@ sAMAccountName: %s
|
||||
|
||||
def test_move(self):
|
||||
full_ou_dn = str(self.samdb.normalize_dn_in_domain("OU=movetest"))
|
||||
(result, out, err) = self.runsubcmd("ou", "create", full_ou_dn)
|
||||
(result, out, err) = self.runsubcmd("ou", "add", full_ou_dn)
|
||||
self.assertCmdSuccess(result, out, err)
|
||||
self.assertEqual(err, "", "There shouldn't be any error message")
|
||||
self.assertIn('Created ou "%s"' % full_ou_dn, out)
|
||||
self.assertIn('Added ou "%s"' % full_ou_dn, out)
|
||||
|
||||
for user in self.users:
|
||||
(result, out, err) = self.runsubcmd(
|
||||
|
Reference in New Issue
Block a user