summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-27 17:24:13 -0600
committerLuke Kanies <luke@madstop.com>2007-11-27 17:24:13 -0600
commit0ef6b9579df65adda51389a2ab3e514ef42afa14 (patch)
tree150340dc12e29d3b8397521e33e2baf60147d299 /test
parenta38b4151244c0af4bdf058d3fec5a01dc271e1c3 (diff)
downloadpuppet-0ef6b9579df65adda51389a2ab3e514ef42afa14.tar.gz
puppet-0ef6b9579df65adda51389a2ab3e514ef42afa14.tar.xz
puppet-0ef6b9579df65adda51389a2ab3e514ef42afa14.zip
Fixing #931 by keeping track in configurations of
what transportable resources get converted to, so different names don't throw it off. I also got rid of the Puppet::Type#merge method, which has been deprecated for ages but was still in there. I had to fix a few tests that weren't cleaning up after themselves as a result.
Diffstat (limited to 'test')
-rwxr-xr-xtest/lib/puppettest.rb6
-rwxr-xr-xtest/ral/types/tidy.rb7
2 files changed, 7 insertions, 6 deletions
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb
index 6447b80fb..76ae96e02 100755
--- a/test/lib/puppettest.rb
+++ b/test/lib/puppettest.rb
@@ -307,12 +307,6 @@ module PuppetTest
# just move on
end
mocha_verify
- if File.stat("/dev/null").mode & 007777 != 0666
- File.open("/tmp/nullfailure", "w") { |f|
- f.puts self.class
- }
- exit(74)
- end
end
def logstore
diff --git a/test/ral/types/tidy.rb b/test/ral/types/tidy.rb
index 8813fcd3f..8220d9974 100755
--- a/test/ral/types/tidy.rb
+++ b/test/ral/types/tidy.rb
@@ -207,7 +207,14 @@ class TestTidy < Test::Unit::TestCase
assert_apply(tidy)
assert(! FileTest.exists?(path), "file did not get tidied")
+ tidy.class.clear
+
# Now try one with just an age attribute.
+ time = Time.now - 10
+ stat = stub 'stat', :mtime => time, :atime => time, :ftype => "file"
+ File.stubs(:lstat)
+ File.stubs(:lstat).with(path).returns(stat)
+
File.open(path, "w") { |f| 10.times { f.puts "yayness " } }
tidy = Puppet::Type.type(:tidy).create :path => path, :age => "5s"