]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gpo: Cleanup script policy test
authorDavid Mulder <dmulder@suse.com>
Fri, 7 Aug 2020 19:58:34 +0000 (13:58 -0600)
committerDavid Mulder <dmulder@samba.org>
Thu, 27 Aug 2020 15:59:33 +0000 (15:59 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/gpo.py

index 90b1d81bc7a53a08219ceb7c3e32f627c2c0b223..88b5da37add7d642eb9f80598cab81766ba3b4b4 100644 (file)
@@ -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)