diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-08-24 13:03:43 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-08-24 15:57:56 -0700 |
commit | 0032a23658caec281c24df179eb9c02d04fc7336 (patch) | |
tree | 6c36dd2a4e16528f0ad91f7aed3a359620af3d07 | |
parent | 6c4451ec9ddcfc6f365ac820ea32a307addaef4d (diff) | |
download | chef-0032a23658caec281c24df179eb9c02d04fc7336.tar.gz |
Add test to ensure that the LCM can be configuredjdm/powershell-validation-fix
-rw-r--r-- | spec/functional/resource/powershell_script_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/functional/resource/powershell_script_spec.rb b/spec/functional/resource/powershell_script_spec.rb index 2e8abedac5..be744e748b 100644 --- a/spec/functional/resource/powershell_script_spec.rb +++ b/spec/functional/resource/powershell_script_spec.rb @@ -227,6 +227,22 @@ describe Chef::Resource::WindowsScript::PowershellScript, :windows_only do expect { resource.should_skip?(:run) }.to raise_error(ArgumentError, /guard_interpreter does not support blocks/) end + context "when dsc is supported", :windows_powershell_dsc_only do + it "can execute LCM configuration code" do + resource.code <<-EOF +configuration LCM +{ + param ($thumbprint) + localconfigurationmanager + { + RebootNodeIfNeeded = $false + ConfigurationMode = 'ApplyOnly' + } +} + EOF + expect { resource.run_action(:run) }.not_to raise_error + end + end end context "when running on a 32-bit version of Ruby", :ruby32_only do |