From: David Mulder Date: Fri, 7 Aug 2020 19:58:34 +0000 (-0600) Subject: gpo: Cleanup script policy test X-Git-Tag: talloc-2.3.2~707 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7acbb4404006fa24ef6c66d324f20a7fbe3bf4b9;p=thirdparty%2Fsamba.git gpo: Cleanup script policy test Signed-off-by: David Mulder Reviewed-by: Douglas Bagnall --- 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)