diff options
author | Adam Jacob <adam@opscode.com> | 2015-01-22 22:17:24 -0800 |
---|---|---|
committer | Thom May <thom@chef.io> | 2015-11-09 15:02:39 +0000 |
commit | c03d49c7cc3b5eb351abc9f6537a1a65692e93fc (patch) | |
tree | 83c528f4fb89b1c26a45396bf4f0542c180d24de /chef-config | |
parent | d70014cbcbb99558437587cf03f7b1ec3939df81 (diff) | |
download | chef-c03d49c7cc3b5eb351abc9f6537a1a65692e93fc.tar.gz |
Implement live streaming for execute resources
This brings live streaming of execute resource output to the
output formatters. It also adds a mechanism for checking to
see if an output formatter is in use through the event dispatch
system.
It adds a new configuration option, "always_stream_execute", which
does what it says on the tin.
Diffstat (limited to 'chef-config')
-rw-r--r-- | chef-config/lib/chef-config/config.rb | 3 | ||||
-rw-r--r-- | chef-config/spec/unit/config_spec.rb | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb index 069f0ed6c0..6a028e9564 100644 --- a/chef-config/lib/chef-config/config.rb +++ b/chef-config/lib/chef-config/config.rb @@ -271,6 +271,9 @@ module ChefConfig # Using `force_logger` causes chef to default to logger output when STDOUT is a tty default :force_logger, false + # Using 'always_stream_output' will have Chef always stream the execute output + default :always_stream_output, false + default :http_retry_count, 5 default :http_retry_delay, 5 default :interval, nil diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb index d99ff428fb..fc8528ad46 100644 --- a/chef-config/spec/unit/config_spec.rb +++ b/chef-config/spec/unit/config_spec.rb @@ -264,6 +264,10 @@ RSpec.describe ChefConfig::Config do end end + it "ChefConfig::Config[:always_stream_output] defaults to false" do + expect(ChefConfig::Config[:always_stream_output]).to eq(false) + end + it "ChefConfig::Config[:file_backup_path] defaults to /var/chef/backup" do allow(ChefConfig::Config).to receive(:cache_path).and_return(primary_cache_path) backup_path = is_windows ? "#{primary_cache_path}\\backup" : "#{primary_cache_path}/backup" |