summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-06-30 13:41:36 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-06-30 13:41:36 -0700
commit81ec58e39e8c1cf53ad43612c20a279a345bcfce (patch)
treeb326ec9af3000a0420fb503a2acf9854ef724311 /spec/functional
parent76db543a0630b47ffc7d7a90c356226a6ab0b9be (diff)
downloadchef-81ec58e39e8c1cf53ad43612c20a279a345bcfce.tar.gz
fix execute resource to use shell_out_with_systems_locale
This may be a breaking change for some users coming from 13.0/13.1 but this was the intended way that this API would function in Chef 13.0. With this change we stop inserting environment variables into execute resources. That means that whatever users type into the execute resource should much more exactly agree with the response on the command line, which will close a shedload of bugs and is how Chef 13.0 was intended to operate. We no longer globally mangle the PATH or the LANG/LC_ locale environment variables. The way that it worked in Chef 13.0/13.1 resulted in the internal chef embedded/bin directory being prepended to the PATH environment variable in the `execute` resource, which was never intended. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/resource/execute_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/functional/resource/execute_spec.rb b/spec/functional/resource/execute_spec.rb
index 09b7286854..c0956c5594 100644
--- a/spec/functional/resource/execute_spec.rb
+++ b/spec/functional/resource/execute_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Serdar Sutay (<serdar@chef.io>)
-# Copyright:: Copyright 2014-2016, Chef Software Inc.
+# Copyright:: Copyright 2014-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,7 +51,7 @@ describe Chef::Resource::Execute do
# why_run mode doesn't disable the updated_by_last_action logic, so we really have to look at the provider action
# to see if why_run correctly disabled the resource. It should shell_out! for the guard but not the resource.
- expect_any_instance_of(Chef::Provider::Execute).to receive(:shell_out!).once
+ expect_any_instance_of(Chef::Provider::Execute).to receive(:shell_out_with_systems_locale!).once
resource.only_if guard
resource.run_action(:run)