From 6315deaa671561684eac792b2956a78fb0690625 Mon Sep 17 00:00:00 2001 From: Jule Anger Date: Thu, 27 Aug 2020 09:25:44 +0200 Subject: [PATCH] samba-tool tests: rename 'ou create' to 'ou add' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jule Anger Reviewed-by: Björn Baumbach Reviewed-by: Douglas Bagnall --- python/samba/tests/samba_tool/computer.py | 2 +- python/samba/tests/samba_tool/group.py | 4 ++-- python/samba/tests/samba_tool/ou.py | 18 +++++++++--------- python/samba/tests/samba_tool/user.py | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/python/samba/tests/samba_tool/computer.py b/python/samba/tests/samba_tool/computer.py index 3110a3b04e8..de101868ad1 100644 --- a/python/samba/tests/samba_tool/computer.py +++ b/python/samba/tests/samba_tool/computer.py @@ -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): diff --git a/python/samba/tests/samba_tool/group.py b/python/samba/tests/samba_tool/group.py index f6a6dd81393..c64f1c613f0 100644 --- a/python/samba/tests/samba_tool/group.py +++ b/python/samba/tests/samba_tool/group.py @@ -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( diff --git a/python/samba/tests/samba_tool/ou.py b/python/samba/tests/samba_tool/ou.py index 54fad3c0161..3cc50b799bd 100644 --- a/python/samba/tests/samba_tool/ou.py +++ b/python/samba/tests/samba_tool/ou.py @@ -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): diff --git a/python/samba/tests/samba_tool/user.py b/python/samba/tests/samba_tool/user.py index d53a2bdb1c1..469d188bae6 100644 --- a/python/samba/tests/samba_tool/user.py +++ b/python/samba/tests/samba_tool/user.py @@ -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( -- 2.47.3