summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2021-06-01 16:28:12 -0700
committerJohn McCrae <john.mccrae@progress.com>2021-06-01 16:28:12 -0700
commit0f82a7ec59e7380e33dd9754a7677db25385b647 (patch)
tree22c87457807202b805a4f7c877fcbb8e2ebe951f /spec
parent1e1a0a5546e18ce8126591c47984c20c606c3ee9 (diff)
downloadchef-0f82a7ec59e7380e33dd9754a7677db25385b647.tar.gz
Updated the Windows Pagefile resource to use PowerShell over WMI, added a corresponding test file
Signed-off-by: John McCrae <john.mccrae@progress.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/resource/windows_pagefile_spec.rb4
-rw-r--r--spec/unit/resource/windows_pagefile_spec.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/functional/resource/windows_pagefile_spec.rb b/spec/functional/resource/windows_pagefile_spec.rb
index d7df445b93..ba50b34b2a 100644
--- a/spec/functional/resource/windows_pagefile_spec.rb
+++ b/spec/functional/resource/windows_pagefile_spec.rb
@@ -21,8 +21,8 @@ require "chef/mixin/powershell_exec"
describe Chef::Resource::WindowsPagefile, :windows_only do
include Chef::Mixin::PowershellExec
- let(:c_path) { 'c:\pagefile.sys' }
- let(:e_path) { 'e:\pagefile.sys' }
+ let(:c_path) { 'C' }
+ let(:e_path) { 'E' }
let(:run_context) do
node = Chef::Node.new
diff --git a/spec/unit/resource/windows_pagefile_spec.rb b/spec/unit/resource/windows_pagefile_spec.rb
index c1bf77948a..e8e81cd63e 100644
--- a/spec/unit/resource/windows_pagefile_spec.rb
+++ b/spec/unit/resource/windows_pagefile_spec.rb
@@ -25,7 +25,7 @@ describe Chef::Resource::WindowsPagefile do
end
it "the path property is the name_property" do
- expect(resource.path).to eql("C:\\pagefile.sys")
+ expect(resource.path).to eql("C")
end
it "sets the default action as :set" do
@@ -39,6 +39,6 @@ describe Chef::Resource::WindowsPagefile do
it "coerces forward slashes in the path property to back slashes" do
resource.path "C:/pagefile.sys"
- expect(resource.path).to eql("C:\\pagefile.sys")
+ expect(resource.path).to eql("C")
end
end