summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-02-01 00:34:11 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-02-01 00:34:11 +0000
commit173f5cc03640a119e77a39047cd7f4f6f0fa1a4e (patch)
tree44a8cb0cd29889e7bb10f235ebc526192d126c90 /test
parent62ab87309abcbc80d469c68ee210f34f566f42c0 (diff)
downloadpuppet-173f5cc03640a119e77a39047cd7f4f6f0fa1a4e.tar.gz
puppet-173f5cc03640a119e77a39047cd7f4f6f0fa1a4e.tar.xz
puppet-173f5cc03640a119e77a39047cd7f4f6f0fa1a4e.zip
Fixing a purging bug introduced by [2138]. I had to move the purge check to the recurse method, rather than the localrecurse method, because the purge check needs to happen after sourcerecurse.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2139 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/types/file.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/types/file.rb b/test/types/file.rb
index ff293d2aa..2710c7dc5 100755
--- a/test/types/file.rb
+++ b/test/types/file.rb
@@ -512,9 +512,6 @@ class TestFile < Test::Unit::TestCase
assert(fileobj, "child object was not created")
assert_equal([fileobj], ret, "child object was not returned")
- # check that the file lists us as a dependency
- assert_equal([[:file, dir.title]], fileobj[:require], "dependency was not set up")
-
# And that it inherited our recurse setting
assert_equal(true, fileobj[:recurse], "file did not inherit recurse")
@@ -557,7 +554,6 @@ class TestFile < Test::Unit::TestCase
badobj = @file[bad]
assert(badobj, "did not create bad object")
- assert_equal(:absent, badobj.should(:ensure), "ensure was not set to absent on bad object")
end
def test_recurse
@@ -1568,7 +1564,7 @@ class TestFile < Test::Unit::TestCase
assert_equal("yayness", File.read(path), "Content did not get set correctly")
end
- # Make sure unmanaged files are be purged.
+ # Make sure unmanaged files are purged.
def test_purge
sourcedir = tempfile()
destdir = tempfile()
@@ -1582,7 +1578,11 @@ class TestFile < Test::Unit::TestCase
# this file should get removed
File.open(purgee, "w") { |f| f.puts "footest" }
- lfobj = Puppet::Type.newfile(:title => "localfile", :path => localfile, :content => "rahtest")
+ lfobj = Puppet::Type.newfile(
+ :title => "localfile",
+ :path => localfile,
+ :content => "rahtest"
+ )
destobj = Puppet::Type.newfile(:title => "destdir", :path => destdir,
@@ -1599,8 +1599,8 @@ class TestFile < Test::Unit::TestCase
assert_nothing_raised { destobj[:purge] = true }
assert_apply(comp)
- assert(FileTest.exists?(dsourcefile), "File got purged")
- assert(FileTest.exists?(localfile), "File got purged")
+ assert(FileTest.exists?(dsourcefile), "Source file got purged")
+ assert(FileTest.exists?(localfile), "Local file got purged")
assert(! FileTest.exists?(purgee), "File did not get purged")
end