diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-07-01 16:28:26 -0700 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-07-02 12:31:52 -0700 |
commit | 7c7f6da17c4f088175e7d616e390b5c7e1e5e65f (patch) | |
tree | 4ed11c9194d4677a0399ff16a74a358d82773119 | |
parent | d6d726bc683b770cdf493ce0977fda095cb8f89c (diff) | |
download | puppet-7c7f6da17c4f088175e7d616e390b5c7e1e5e65f.tar.gz puppet-7c7f6da17c4f088175e7d616e390b5c7e1e5e65f.tar.xz puppet-7c7f6da17c4f088175e7d616e390b5c7e1e5e65f.zip |
maint: file_spec heisenbugs
Puppet::Util::Storage was trying to create state.yaml during unrelated
specs.
-rwxr-xr-x | spec/integration/type/file_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |