summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-10-15 19:36:32 -0500
committerLuke Kanies <luke@madstop.com>2007-10-15 19:36:32 -0500
commita815f7888b021a46332c23450795f057533d0093 (patch)
treea2f8081e47750c7782db9c3751ec4091f3f7424f /spec/unit/node
parent694f98b4d9e7172cec58d407bc5aeae7861e1a06 (diff)
downloadpuppet-a815f7888b021a46332c23450795f057533d0093.tar.gz
puppet-a815f7888b021a46332c23450795f057533d0093.tar.xz
puppet-a815f7888b021a46332c23450795f057533d0093.zip
Reorganizing the file structure for indirection terminus types.
Previously, for example, the configuration terminus that was a subclass of 'code' would have been stored at lib/puppet/indirector/code/configuration and would have had to have been named 'configuration'. Now, the subclass can be named however the author prefers, and it must be stored at lib/puppet/indirector/configuration/<name>.rb, where <name> is the name you've chosen for the terminus type. The name only matters insomuch as it is used to load the file from disk and find the appropriate class when asked. The additional restriction is that the class constant for the terminus type must have its name as the last word, and the indirection must be the second to last word. Thus, in our example, we can choose any class constant that ends with Configuration::Code; given that there's only one Configuration class at this point, it makes the most sense to define the class as Puppet::Node::Configuration::Code. This is somewhat awkward, because of the class's location on disk, but the only other real option is to autogenerate a Puppet::Indirector::Configuration class constant, which is, I think, uglier.
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/configuration.rb4
-rwxr-xr-xspec/unit/node/facts.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/node/configuration.rb b/spec/unit/node/configuration.rb
index 62d8e343d..5f807b9b6 100755
--- a/spec/unit/node/configuration.rb
+++ b/spec/unit/node/configuration.rb
@@ -651,8 +651,8 @@ describe Puppet::Node::Configuration, " when indirecting" do
Puppet::Node::Configuration.find(:myconfig)
end
- it "should default to the code terminus" do
- Puppet::Node::Configuration.indirection.terminus_class.should == :code
+ it "should default to the 'compiler' terminus" do
+ Puppet::Node::Configuration.indirection.terminus_class.should == :compiler
end
after do
diff --git a/spec/unit/node/facts.rb b/spec/unit/node/facts.rb
index ef5c91071..743a7082e 100755
--- a/spec/unit/node/facts.rb
+++ b/spec/unit/node/facts.rb
@@ -26,8 +26,8 @@ describe Puppet::Node::Facts, " when indirecting" do
@facts.save
end
- it "should default to the code terminus" do
- Puppet::Node::Facts.indirection.terminus_class.should == :code
+ it "should default to the 'facter' terminus" do
+ Puppet::Node::Facts.indirection.terminus_class.should == :facter
end
after do