diff options
author | Matt Wrock <matt@mattwrock.com> | 2020-11-20 12:33:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 12:33:54 -0800 |
commit | c19dfd70148d07f6ae6f8fb2aa00bda50115ba2a (patch) | |
tree | 45ead43c9ef8920a392daaff69e31142b3fc22b4 | |
parent | 83860fb124b5cf01eaf9391a5a56798958f7b141 (diff) | |
parent | 7e9524b9bd5116347fb35e102b4863ccec479143 (diff) | |
download | chef-c19dfd70148d07f6ae6f8fb2aa00bda50115ba2a.tar.gz |
Merge pull request #10672 from chef/guard_password
include password in guard inherited attributes
-rw-r--r-- | lib/chef/resource/execute.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/unit/script_resource.rb | 4 | ||||
-rw-r--r-- | spec/unit/resource/powershell_script_spec.rb | 4 |
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 |