From 7c7f6da17c4f088175e7d616e390b5c7e1e5e65f Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Thu, 1 Jul 2010 16:28:26 -0700 Subject: maint: file_spec heisenbugs Puppet::Util::Storage was trying to create state.yaml during unrelated specs. --- spec/integration/type/file_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/integration/type/file_spec.rb b/spec/integration/type/file_spec.rb index 47a54872c..f215f0b08 100755 --- a/spec/integration/type/file_spec.rb +++ b/spec/integration/type/file_spec.rb @@ -7,6 +7,11 @@ require 'puppet_spec/files' describe Puppet::Type.type(:file) do include PuppetSpec::Files + before do + # stub this to not try to create state.yaml + Puppet::Util::Storage.stubs(:store) + end + it "should not attempt to manage files that do not exist if no means of creating the file is specified" do file = Puppet::Type.type(:file).new :path => "/my/file", :mode => "755" catalog = Puppet::Resource::Catalog.new @@ -128,6 +133,8 @@ describe Puppet::Type.type(:file) do it "should propagate failures encountered when renaming the temporary file" do file = Puppet::Type.type(:file).new :path => tmpfile("fail_rename"), :content => "foo" + file.stubs(:remove_existing) # because it tries to make a backup + catalog = Puppet::Resource::Catalog.new catalog.add_resource file -- cgit