diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-11-05 19:36:28 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-11-16 08:59:00 +1100 |
commit | 256391c0faf4ff4d408821e3fe8cfe2eff44c043 (patch) | |
tree | 5808e4d93f39e5e7c2cfead6f8a08334bd7c8961 /source4/scripting/python/samba/tests | |
parent | cf1540b73714fac6b25de5942cbd821e5f4f6ffc (diff) | |
download | samba-256391c0faf4ff4d408821e3fe8cfe2eff44c043.tar.gz samba-256391c0faf4ff4d408821e3fe8cfe2eff44c043.tar.xz samba-256391c0faf4ff4d408821e3fe8cfe2eff44c043.zip |
samba-tool: Add new samba-tool gpo aclcheck and test
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/scripting/python/samba/tests')
-rw-r--r-- | source4/scripting/python/samba/tests/samba_tool/gpo.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/tests/samba_tool/gpo.py b/source4/scripting/python/samba/tests/samba_tool/gpo.py index 7ada91f80bf..82e7268e1b9 100644 --- a/source4/scripting/python/samba/tests/samba_tool/gpo.py +++ b/source4/scripting/python/samba/tests/samba_tool/gpo.py @@ -44,6 +44,16 @@ os.environ["SERVER"]) self.assertCmdSuccess(result, "Ensuring gpo fetched successfully") shutil.rmtree(os.path.join(self.tempdir, "policy")) + def test_show(self): + """Show a real GPO, and make sure it passes""" + (result, out, err) = self.runsubcmd("gpo", "show", self.gpo_guid, "-H", "ldap://%s" % os.environ["SERVER"]) + self.assertCmdSuccess(result, "Ensuring gpo fetched successfully") + + def test_aclcheck(self): + """Check all the GPOs on the remote server have correct ACLs""" + (result, out, err) = self.runsubcmd("gpo", "aclcheck", "-H", "ldap://%s" % os.environ["SERVER"], "-U%s%%%s" % (os.environ["USERNAME"], os.environ["PASSWORD"])) + self.assertCmdSuccess(result, "Ensuring gpo checked successfully") + def setUp(self): """set up a temporary GPO to work with""" super(GpoCmdTestCase, self).setUp() |