summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-08 16:38:45 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-08 16:38:45 +0000
commit8e4cf2289d7e29b044f3bad2d1e8011c3d0543b4 (patch)
treec025c6bf782a71f7402f856c34c05c8786bfc607 /test
parent58db0ef2ba966334cd65a67a3dc0112af8f8dda2 (diff)
first bug fixed, where sources were not updating the checksum
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@882 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/types/filesources.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/types/filesources.rb b/test/types/filesources.rb
index a3fb358a6..51cbddf26 100755
--- a/test/types/filesources.rb
+++ b/test/types/filesources.rb
@@ -562,6 +562,28 @@ class TestFileSources < Test::Unit::TestCase
assert_equal("yee-haw", txt, "Contents do not match")
end
+
+ # Make sure that source-copying updates the checksum on the same run
+ def test_checksumchange
+ source = tempfile()
+ dest = tempfile()
+ File.open(dest, "w") { |f| f.puts "boo" }
+ File.open(source, "w") { |f| f.puts "yay" }
+
+ file = nil
+ assert_nothing_raised {
+ file = Puppet.type(:file).create(
+ :name => dest,
+ :source => source
+ )
+ }
+
+ file.retrieve
+
+ assert_events([:file_changed], file)
+ file.retrieve
+ assert_events([], file)
+ end
end
# $Id$