diff options
author | Claire McQuin <claire@getchef.com> | 2015-09-08 12:20:45 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2015-09-08 13:24:25 -0700 |
commit | 998e13adbda5e964d2f8d17ebd8f216f752244a6 (patch) | |
tree | 6bd0c042229dca9865bc37a81a87bc1c7bf23d83 /lib/chef/platform | |
parent | 530119278f6a71eef4b0bf02df022218a96dcecc (diff) | |
download | chef-998e13adbda5e964d2f8d17ebd8f216f752244a6.tar.gz |
Skip tests unless RefreshMode is Disabled
Diffstat (limited to 'lib/chef/platform')
-rw-r--r-- | lib/chef/platform/query_helpers.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb index e64189fbd6..ea86ab227f 100644 --- a/lib/chef/platform/query_helpers.rb +++ b/lib/chef/platform/query_helpers.rb @@ -52,6 +52,13 @@ class Chef Gem::Version.new(node[:languages][:powershell][:version]) >= Gem::Version.new("5.0.10018.0") end + + def refresh_mode_disabled?(node) + require 'chef/util/powershell/cmdlet' + cmdlet = Chef::Util::Powershell::Cmdlet.new(node, "Get-DscLocalConfigurationManager", :object) + metadata = cmdlet.run!.return_value + metadata['RefreshMode'] == 'Disabled' + end end end end |