diff options
| author | Markus Roberts <Markus@reality.com> | 2010-09-04 18:45:09 -0700 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2010-09-07 12:49:00 +1000 |
| commit | 4d55c6e72f2576fe7ab27f874db030de5ab6fcee (patch) | |
| tree | 7921392694449ee9ff41c4b37e40900c8338bd9f /lib | |
| parent | b397b698314daae36f59751521be113cfd337095 (diff) | |
| download | puppet-4d55c6e72f2576fe7ab27f874db030de5ab6fcee.tar.gz puppet-4d55c6e72f2576fe7ab27f874db030de5ab6fcee.tar.xz puppet-4d55c6e72f2576fe7ab27f874db030de5ab6fcee.zip | |
Fix for tests broken by fix for #4489 -- stub standalone
If the file streaming is to be thwarted when running standalone the test for
standalone needs to be stubbed when running specs, lest the tests inexplicably
fail.
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/puppet/type/file/content.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb index f5b65d3fd..b8f30a9c7 100755 --- a/lib/puppet/type/file/content.rb +++ b/lib/puppet/type/file/content.rb @@ -161,12 +161,16 @@ module Puppet } end + def self.standalone? + Puppet.settings[:name] == "apply" + end + def each_chunk_from(source_or_content) if source_or_content.is_a?(String) yield source_or_content elsif source_or_content.nil? yield read_file_from_filebucket - elsif Puppet.settings[:name] == "apply" + elsif self.class.standalone? yield source_or_content.content elsif source_or_content.local? chunk_file_from_disk(source_or_content) { |chunk| yield chunk } |
