summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@puppetlabs.com>2010-04-12 11:07:05 -0700
committerLuke Kanies <luke@puppetlabs.com>2010-04-12 11:07:05 -0700
commit410b71ca4c85971b4fa3ccab461942c5968816dc (patch)
treea5e385cdf791f7d42f39bb1b056881a753ff1e1a
parenteffa7196781c2c233935206388c7e18d410e8e5f (diff)
downloadpuppet-410b71ca4c85971b4fa3ccab461942c5968816dc.tar.gz
puppet-410b71ca4c85971b4fa3ccab461942c5968816dc.tar.xz
puppet-410b71ca4c85971b4fa3ccab461942c5968816dc.zip
Removing invalid File integration test
The point of this test was to confirm that we could take a given file resource and have it work multiple times in memory, but that's not actually possible given our current code. We copy the values over from the source metadata, and suddenly have no method for differentiation between values set by the user and those set by the remote source. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
-rwxr-xr-xspec/integration/type/file.rb31
1 files changed, 2 insertions, 29 deletions
diff --git a/spec/integration/type/file.rb b/spec/integration/type/file.rb
index 259c975ff..6222f0a89 100755
--- a/spec/integration/type/file.rb
+++ b/spec/integration/type/file.rb
@@ -19,12 +19,6 @@ describe Puppet::Type.type(:file) do
end
describe "when writing files" do
- before do
- Puppet::Util::Log.newdestination :console
- end
-
- after { Puppet::Util::Log.close :console }
-
it "should backup files to a filebucket when one is configured" do
bucket = Puppet::Type.type(:filebucket).new :path => tmpfile("filebucket"), :name => "mybucket"
file = Puppet::Type.type(:file).new :path => tmpfile("bucket_backs"), :backup => "mybucket", :content => "foo"
@@ -358,6 +352,7 @@ describe Puppet::Type.type(:file) do
dest = tmpfile("destwith spaces")
File.open(source, "w") { |f| f.print "foo" }
+ File.chmod(0755, source)
file = Puppet::Type::File.new(:path => dest, :source => source)
@@ -367,29 +362,7 @@ describe Puppet::Type.type(:file) do
catalog.apply
File.read(dest).should == "foo"
- end
-
- it "should be able to notice changed files in the same process" do
- source = tmpfile("source")
- dest = tmpfile("dest")
-
- File.open(source, "w") { |f| f.print "foo" }
-
- file = Puppet::Type::File.new(:name => dest, :source => source, :backup => false)
-
- catalog = Puppet::Resource::Catalog.new
- catalog.add_resource file
- catalog.apply
-
- File.read(dest).should == "foo"
-
- # Now change the file
- File.open(source, "w") { |f| f.print "bar" }
- file.expire
- catalog.apply
-
- # And make sure it's changed
- File.read(dest).should == "bar"
+ (File.stat(dest).mode & 007777).should == 0755
end
it "should be able to copy individual files even if recurse has been specified" do