[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08

James Turnbull james at lovedthanlost.net
Fri Jan 15 09:08:01 UTC 2010


The following commit has been merged in the upstream branch:
commit 727ee72b12125223b5d0d0704dc35f5c71a1a04e
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Fri Dec 18 18:48:05 2009 -0800

    Fix #2966 spec/unit/util/queue.rb can't be run twice
    
    This spec wasn't cleaing up after itself, and raised several exceptions
    when trying to register the same queue type again.
    Part of the #2879 test idempotency suite.
    
    Signed-off-by: Jesse Wolfe <jes5199 at gmail.com>

diff --git a/spec/unit/util/queue.rb b/spec/unit/util/queue.rb
index 19af943..c8a7555 100755
--- a/spec/unit/util/queue.rb
+++ b/spec/unit/util/queue.rb
@@ -19,16 +19,24 @@ end
 
 mod = Puppet::Util::Queue
 client_classes = { :default => make_test_client_class('Bogus::Default'), :setup => make_test_client_class('Bogus::Setup') }
-mod.register_queue_type(client_classes[:default], :default)
-mod.register_queue_type(client_classes[:setup], :setup)
 
 describe Puppet::Util::Queue do
+    before :all do
+        mod.register_queue_type(client_classes[:default], :default)
+        mod.register_queue_type(client_classes[:setup], :setup)
+    end
+
     before :each do
         @class = Class.new do
             extend mod
         end
     end
 
+    after :all do
+        instances = mod.instance_hash(:queue_clients)
+        [:default, :setup, :bogus, :aardvark, :conflict, :test_a, :test_b].each{ |x| instances.delete(x) }
+    end
+
     context 'when determining a type name from a class' do
         it 'should handle a simple one-word class name' do
             mod.queue_type_from_class(make_test_client_class('Foo')).should == :foo

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list