diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-28 16:18:21 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-28 16:18:21 +0000 |
| commit | 94caa8a48f32ed1fd3aa38dc43e2add97026fcf2 (patch) | |
| tree | 407fdab60a044b42c94e6fcce5d30c4df7067a18 /test | |
| parent | bcfc469e4aa36ab8b98af57b1314e26d5d7a0a18 (diff) | |
| download | puppet-94caa8a48f32ed1fd3aa38dc43e2add97026fcf2.tar.gz puppet-94caa8a48f32ed1fd3aa38dc43e2add97026fcf2.tar.xz puppet-94caa8a48f32ed1fd3aa38dc43e2add97026fcf2.zip | |
Fixing #128. md5lite was being used instead of full md5. At this point, md5lite cannot be used for source copies.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1146 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rw-r--r-- | test/types/file.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/types/file.rb b/test/types/file.rb index 04993db82..2eeb2b2a5 100644 --- a/test/types/file.rb +++ b/test/types/file.rb @@ -1116,6 +1116,32 @@ class TestFile < Test::Unit::TestCase assert_equal(0440, filemode(bucketedpath)) end + + def test_largefilechanges + source = tempfile() + dest = tempfile() + + # Now make a large file + File.open(source, "w") { |f| + 500.times { |i| f.puts "line %s" % i } + } + + obj = Puppet::Type.type(:file).create( + :name => dest, :source => source + ) + + assert_events([:file_created], obj) + + File.open(source, File::APPEND|File::WRONLY) { |f| f.puts "another line" } + + assert_events([:file_changed], obj) + + # Now modify the dest file + File.open(dest, File::APPEND|File::WRONLY) { |f| f.puts "one more line" } + + assert_events([:file_changed, :file_changed], obj) + + end end # $Id$ |
