diff options
| author | Luke Kanies <luke@madstop.com> | 2008-07-03 17:27:11 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-07-03 17:27:11 -0500 |
| commit | ba12d3000d31dbccb3b60320eae6c1be302e0bd5 (patch) | |
| tree | a547aaf7aa4bb60121416a9c0e1c6ba073e19eff /spec/unit | |
| parent | 7a6ae299621a16fa7fd8ab0fbd2c05fe723cffa4 (diff) | |
| download | puppet-ba12d3000d31dbccb3b60320eae6c1be302e0bd5.tar.gz puppet-ba12d3000d31dbccb3b60320eae6c1be302e0bd5.tar.xz puppet-ba12d3000d31dbccb3b60320eae6c1be302e0bd5.zip | |
Fixed #1232 - the rundir no longer specifies a user/group,
and there are now client- and server-specific yaml directories.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/indirector/yaml.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/unit/indirector/yaml.rb b/spec/unit/indirector/yaml.rb index 53d12f426..3875d70aa 100755 --- a/spec/unit/indirector/yaml.rb +++ b/spec/unit/indirector/yaml.rb @@ -20,12 +20,25 @@ describe Puppet::Indirector::Yaml, " when choosing file location" do @subject.name = :me @dir = "/what/ever" - Puppet.settings.stubs(:value).with(:yamldir).returns(@dir) + Puppet.settings.stubs(:value).returns("fakesettingdata") + Puppet.settings.stubs(:value).with(:clientyamldir).returns(@dir) @request = stub 'request', :key => :me, :instance => @subject end describe Puppet::Indirector::Yaml, " when choosing file location" do + it "should use the yamldir if the process name is 'puppetmasterd'" do + Puppet.settings.expects(:value).with(:name).returns "puppetmasterd" + Puppet.settings.expects(:value).with(:yamldir).returns "/main/yaml/dir" + @store.path(:me).should =~ %r{^/main/yaml/dir} + end + + it "should use the client yamldir if the process name is not 'puppetmasterd'" do + Puppet.settings.expects(:value).with(:name).returns "cient" + Puppet.settings.expects(:value).with(:clientyamldir).returns "/client/yaml/dir" + @store.path(:me).should =~ %r{^/client/yaml/dir} + end + it "should store all files in a single file root set in the Puppet defaults" do @store.path(:me).should =~ %r{^#{@dir}} end |
