diff options
author | Ethan Rowe <ethan@endpoint.com> | 2009-04-13 07:46:53 -0400 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-04-22 14:39:38 +1000 |
commit | a3b1e8ce9c8ad97ed3bcf65c0554ae34690716fa (patch) | |
tree | f6229b675c8924796e6cc1ad18e8caf90ba3b1fe /spec/unit/indirector | |
parent | bccfcc9d3a316e79f7e07e7f0d837b82940c071a (diff) | |
download | puppet-a3b1e8ce9c8ad97ed3bcf65c0554ae34690716fa.tar.gz puppet-a3b1e8ce9c8ad97ed3bcf65c0554ae34690716fa.tar.xz puppet-a3b1e8ce9c8ad97ed3bcf65c0554ae34690716fa.zip |
Add queue indirection as an option for catalog storage.
This eventually will allow catalog storage ("storeconfigs") to be taken out of the critical request-handling path of puppetmasterd, such that:
* Puppet::Node::Catalog can be serialized to a message queue via the indirector's "save" method
* a separate process can use Puppet::Node::Catalog::Queue.subscribe to pick up these catalog objects as they come in and can save them to the database through the :active_record terminus
Diffstat (limited to 'spec/unit/indirector')
-rwxr-xr-x | spec/unit/indirector/catalog/queue.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/unit/indirector/catalog/queue.rb b/spec/unit/indirector/catalog/queue.rb new file mode 100755 index 000000000..e47af3126 --- /dev/null +++ b/spec/unit/indirector/catalog/queue.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../../spec_helper' + +require 'puppet/indirector/catalog/queue' + +describe Puppet::Node::Catalog::Queue do + it 'should be a subclass of the Queue terminus' do + Puppet::Node::Catalog::Queue.superclass.should equal(Puppet::Indirector::Queue) + end + + it 'should be registered with the catalog store indirection' do + indirection = Puppet::Indirector::Indirection.instance(:catalog) + Puppet::Node::Catalog::Queue.indirection.should equal(indirection) + end + + it 'shall be dubbed ":queue"' do + Puppet::Node::Catalog::Queue.name.should == :queue + end +end |