diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-08 16:38:45 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-08 16:38:45 +0000 |
| commit | 8e4cf2289d7e29b044f3bad2d1e8011c3d0543b4 (patch) | |
| tree | c025c6bf782a71f7402f856c34c05c8786bfc607 /test | |
| parent | 58db0ef2ba966334cd65a67a3dc0112af8f8dda2 (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-x | test/types/filesources.rb | 22 |
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$ |
