summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDavid Mulder <dmulder@suse.com>2020-08-07 13:58:34 -0600
committerDavid Mulder <dmulder@samba.org>2020-08-27 15:59:33 +0000
commit7acbb4404006fa24ef6c66d324f20a7fbe3bf4b9 (patch)
treec748a99a848135029a2bdacdc2aa27586e5ad3c5 /python
parent0544237ea2c1cf7d507e60e2757653711be5e308 (diff)
downloadsamba-7acbb4404006fa24ef6c66d324f20a7fbe3bf4b9.tar.gz
samba-7acbb4404006fa24ef6c66d324f20a7fbe3bf4b9.tar.bz2
samba-7acbb4404006fa24ef6c66d324f20a7fbe3bf4b9.zip
gpo: Cleanup script policy test
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/gpo.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/samba/tests/gpo.py b/python/samba/tests/gpo.py
index 90b1d81bc7a..88b5da37add 100644
--- a/python/samba/tests/gpo.py
+++ b/python/samba/tests/gpo.py
@@ -371,6 +371,13 @@ class GPOTests(tests.TestCase):
self.assertIn(b'hello world', out,
'%s script execution failed' % keyname.decode())
+ # Remove policy
+ gp_db = store.get_gplog(machine_creds.get_username())
+ del_gpos = get_deleted_gpos_list(gp_db, [])
+ ext.process_group_policy(del_gpos, [])
+ self.assertEquals(len(os.listdir(dname)), 0,
+ 'Unapply failed to cleanup scripts')
+
# Unstage the Registry.pol file
unstage_file(reg_pol)