diff options
| author | Luke Kanies <luke@reductivelabs.com> | 2009-12-21 16:23:44 -0800 |
|---|---|---|
| committer | Luke Kanies <luke@reductivelabs.com> | 2009-12-21 16:23:44 -0800 |
| commit | 740fd6b301af89ab3aad89bca183ad1fcdc24ac4 (patch) | |
| tree | f34617a229509c373d28d67abb453e7ae2136c39 /spec/integration | |
| parent | 8971d8beae2c409f9052f27c3f80ad3bdfff4de2 (diff) | |
| parent | 4a06379f8770c164e42bcc410d874076c6e95f24 (diff) | |
Merge branch '0.25.x'
Conflicts:
lib/puppet/agent.rb
lib/puppet/application/puppetd.rb
lib/puppet/parser/ast/leaf.rb
lib/puppet/util/rdoc/parser.rb
Diffstat (limited to 'spec/integration')
| -rwxr-xr-x | spec/integration/defaults.rb | 11 | ||||
| -rwxr-xr-x | spec/integration/type/file.rb | 21 |
2 files changed, 31 insertions, 1 deletions
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb index 0e9a03fcb..590be1310 100755 --- a/spec/integration/defaults.rb +++ b/spec/integration/defaults.rb @@ -29,6 +29,17 @@ describe "Puppet defaults" do end end + describe "when setting the :catalog_format" do + it "should log a deprecation notice" do + Puppet.expects(:warning) + Puppet.settings[:catalog_format] = 'marshal' + end + it "should copy the value to :preferred_serialization_format" do + Puppet.settings[:catalog_format] = 'marshal' + Puppet.settings[:preferred_serialization_format].should == 'marshal' + end + end + it "should have a clientyamldir setting" do Puppet.settings[:clientyamldir].should_not be_nil end diff --git a/spec/integration/type/file.rb b/spec/integration/type/file.rb index 40f9244f1..fe6e2ddc6 100755 --- a/spec/integration/type/file.rb +++ b/spec/integration/type/file.rb @@ -223,7 +223,7 @@ describe Puppet::Type.type(:file) do end it "should not recursively manage files managed by a more specific explicit file" do - dir = tmpfile("file_source_integration_source") + dir = tmpfile("recursion_vs_explicit_1") subdir = File.join(dir, "subdir") file = File.join(subdir, "file") @@ -242,6 +242,25 @@ describe Puppet::Type.type(:file) do (File.stat(file).mode & 007777).should == 0644 end + + it "should recursively manage files even if there is an explicit file whose name is a prefix of the managed file" do + dir = tmpfile("recursion_vs_explicit_2") + + managed = File.join(dir, "file") + generated = File.join(dir, "file_with_a_name_starting_with_the_word_file") + + FileUtils.mkdir_p(dir) + File.open(managed, "w") { |f| f.puts "" } + File.open(generated, "w") { |f| f.puts "" } + + @catalog = Puppet::Resource::Catalog.new + @catalog.add_resource Puppet::Type::File.new(:name => dir, :recurse => true, :backup => false, :mode => "755") + @catalog.add_resource Puppet::Type::File.new(:name => managed, :recurse => true, :backup => false, :mode => "644") + + @catalog.apply + + (File.stat(generated).mode & 007777).should == 0755 + end end describe "when generating resources" do |
