Make pruning use the correct config and clean up *before* running tests, too.
[mailshears.git] / lib / prune / prune_dummy_runner.rb
index 64c2606979aad0298cd94b3547d9703da78f21dd..d488f7ea155c7a77633212aeee3776d844921bbe 100644 (file)
@@ -5,11 +5,10 @@ require 'rm/rm_dummy_runner'
 class PruneDummyRunner
   include Runner
 
-  def run(plugin)
+  def run(cfg, plugin)
     # We don't want to check the PostfixAdmin database against itself.
     return if plugin.class == PostfixadminPrune
 
-    cfg = Configuration.new()
     pfa = PostfixadminPrune.new(cfg)
 
     db_users = pfa.list_users()
@@ -19,7 +18,7 @@ class PruneDummyRunner
     leftovers += plugin.get_leftover_domains(db_domains)
 
     rm_dummy_runner = RmDummyRunner.new()
-    rm_dummy_runner.run(plugin, *leftovers)
+    rm_dummy_runner.run(cfg, plugin, *leftovers)
   end
 
 end