1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

gpo: Test rsop function for success

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
David Mulder
2020-08-28 08:38:41 -06:00
committed by Jeremy Allison
parent 07ce480888
commit dff01a5edf
3 changed files with 13 additions and 2 deletions

View File

@ -66,6 +66,12 @@ def gpupdate_unapply(lp):
return Popen(gpupdate, stdout=PIPE, stderr=PIPE).wait()
def rsop(lp):
gpupdate = lp.get('gpo update command')
gpupdate.append('--rsop')
return Popen(gpupdate, stdout=PIPE).wait()
def stage_file(path, data):
dirname = os.path.dirname(path)
if not os.path.exists(dirname):
@ -571,6 +577,10 @@ class GPOTests(tests.TestCase):
unstage_file(gpofile % g.name)
unstage_file(reg_pol % g.name)
# Check that a call to gpupdate --rsop also succeeds
ret = rsop(self.lp)
self.assertEquals(ret, 0, 'gpupdate --rsop failed!')
def test_gp_unapply(self):
logger = logging.getLogger('gpo_tests')
cache_dir = self.lp.get('cache directory')