]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool tests: rename 'ou create' to 'ou add'
authorJule Anger <ja@sernet.de>
Thu, 27 Aug 2020 07:25:44 +0000 (09:25 +0200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 1 Oct 2020 01:18:40 +0000 (01:18 +0000)
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>
python/samba/tests/samba_tool/computer.py
python/samba/tests/samba_tool/group.py
python/samba/tests/samba_tool/ou.py
python/samba/tests/samba_tool/user.py

index 3110a3b04e824f6cf59eaed81f79e8e1fa199d1d..de101868ad11fda0ac249e3b9a2c1a26bf0794bb 100644 (file)
@@ -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):
index f6a6dd81393a97733e98c3e541495901452cb079..c64f1c613f021bb5548126c67635dfdc7299aaab 100644 (file)
@@ -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(
index 54fad3c0161ff179deb2fa5f106d4f92838f944d..3cc50b799bd57d056a10b8889bcb80ddcb61267a 100644 (file)
@@ -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):
index d53a2bdb1c18da92511dc755479b860a981892b4..469d188bae6d070c6fde89fee14b0131d0e36a9c 100644 (file)
@@ -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(