summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormwrock <matt@mattwrock.com>2020-11-20 11:50:59 -0800
committermwrock <matt@mattwrock.com>2020-11-20 11:50:59 -0800
commit7e9524b9bd5116347fb35e102b4863ccec479143 (patch)
tree45ead43c9ef8920a392daaff69e31142b3fc22b4
parent83860fb124b5cf01eaf9391a5a56798958f7b141 (diff)
downloadchef-guard_password.tar.gz
include password in guard inherited attributesguard_password
Signed-off-by: mwrock <matt@mattwrock.com>
-rw-r--r--lib/chef/resource/execute.rb2
-rw-r--r--spec/support/shared/unit/script_resource.rb4
-rw-r--r--spec/unit/resource/powershell_script_spec.rb4
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
index 7a561209fc..5a78160642 100644
--- a/lib/chef/resource/execute.rb
+++ b/lib/chef/resource/execute.rb
@@ -661,8 +661,10 @@ class Chef
set_guard_inherited_attributes(
:cwd,
+ :domain,
:environment,
:group,
+ :password,
:user,
:umask
)
diff --git a/spec/support/shared/unit/script_resource.rb b/spec/support/shared/unit/script_resource.rb
index b06551d170..0256112a68 100644
--- a/spec/support/shared/unit/script_resource.rb
+++ b/spec/support/shared/unit/script_resource.rb
@@ -47,9 +47,9 @@ shared_examples_for "a script resource" do
end
describe "when executing guards" do
- it "inherits exactly the :cwd, :environment, :group, :path, :user, and :umask attributes from a parent resource class" do
+ it "inherits exactly the :cwd, :domain, :environment, :group, :password, :path, :user, and :umask attributes from a parent resource class" do
inherited_difference = Chef::Resource::Script.guard_inherited_attributes -
- %i{cwd environment group path user umask}
+ %i{cwd domain environment group password path user umask}
expect(inherited_difference).to eq([])
end
diff --git a/spec/unit/resource/powershell_script_spec.rb b/spec/unit/resource/powershell_script_spec.rb
index 1c4b081593..a913583cfa 100644
--- a/spec/unit/resource/powershell_script_spec.rb
+++ b/spec/unit/resource/powershell_script_spec.rb
@@ -47,9 +47,9 @@ describe Chef::Resource::PowershellScript do
expect(resource.convert_boolean_return).to eq(false)
end
- it "inherits exactly the :cwd, :environment, :group, :path, :user, :umask, :architecture, :elevated, :interpreter properties from a parent resource class" do
+ it "inherits exactly the :cwd, :domain, :environment, :group, :password, :path, :user, :umask, :architecture, :elevated, :interpreter properties from a parent resource class" do
inherited_difference = Chef::Resource::PowershellScript.guard_inherited_attributes -
- %i{cwd environment group path user umask architecture elevated interpreter}
+ %i{cwd domain environment group password path user umask architecture elevated interpreter}
expect(inherited_difference).to eq([])
end