summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2022-10-06 16:35:30 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2022-10-07 17:14:18 -0400
commitdb595dca23b18e3da882b105b22679a0d2e1433c (patch)
tree61dbda8de12d6daeb8da9add3979cd33ae284170 /spec
parent7172ceba1d749404b3ad331b4a9f8b2a584ab20b (diff)
downloadchef-db595dca23b18e3da882b105b22679a0d2e1433c.tar.gz
Allow dsc_refresh_mode_disabled to be invoked in test
Currently we're failing this test on a pre-emptive direct execution of Get-LocalDscConfigurationManager that we're doing in the test. It is not returning the expected result, but it's hiding the errors. Instead, we'll let the actual thing we want to test occur (dsc_refresh_mode_disabled) - because it runs the same command, and raises an error if it fails. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/platform/query_helpers_spec.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/spec/unit/platform/query_helpers_spec.rb b/spec/unit/platform/query_helpers_spec.rb
index 424bd6348b..0671d98476 100644
--- a/spec/unit/platform/query_helpers_spec.rb
+++ b/spec/unit/platform/query_helpers_spec.rb
@@ -41,12 +41,8 @@ end
describe "Chef::Platform#dsc_refresh_mode_disabled?", :windows_only do
let(:node) { instance_double("Chef::Node") }
- let(:powershell) { Class.new { include ChefPowerShell::ChefPowerShellModule::PowerShellExec } }
- subject(:object) { powershell.new }
it "returns true when RefreshMode is Disabled" do
- execution = object.powershell_exec("Get-DscLocalConfigurationManager", :powershell, timeout: -1)
- expect(execution.result["RefreshMode"]).to eq "PUSH"
expect(Chef::Platform.dsc_refresh_mode_disabled?(node)).to be false
end
end