diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-03-13 14:57:39 +0100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2010-03-25 11:54:08 +1100 |
| commit | 19863c07f983ec181fb81c797ee8b9c8d335e18c (patch) | |
| tree | 6f457f4e7ff5eb2b7a0aebf3baf61664ab147dd2 /spec/unit/util | |
| parent | fd76142b314c390205570d02383607ff91b23391 (diff) | |
Fix #2929 - Allow checksum to be "none"
File checksum is "md5" by default. When managing local files (not sourced
or content) it might be desirable to not checksum files, especially
when managing deep hierarchies containing many files.
This patch allows to write such manifests:
file {
"/path/to/deep/hierarchy":
owner => brice, recurse => true, checksum => none
}
Then puppet(d) won't checksum those files, just manage their ownership.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec/unit/util')
| -rwxr-xr-x | spec/unit/util/checksums.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/util/checksums.rb b/spec/unit/util/checksums.rb index d31d7a000..615ed902c 100755 --- a/spec/unit/util/checksums.rb +++ b/spec/unit/util/checksums.rb @@ -14,7 +14,7 @@ describe Puppet::Util::Checksums do end content_sums = [:md5, :md5lite, :sha1, :sha1lite] - file_only = [:ctime, :mtime] + file_only = [:ctime, :mtime, :none] content_sums.each do |sumtype| it "should be able to calculate %s sums from strings" % sumtype do @@ -104,4 +104,10 @@ describe Puppet::Util::Checksums do end end end + + describe "when using the none checksum" do + it "should return an empty string" do + @summer.none_file("/my/file").should == "" + end + end end |
