summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-01-30 18:17:52 -0800
committerGitHub <noreply@github.com>2018-01-30 18:17:52 -0800
commite1b721f4d05148edf3619383b9356be3e498436c (patch)
treeebf2faf1ae59c2c6a4b277123c09565e02540da3
parent94ce3359c2700b19bb74cab64de9f5f59c13ca73 (diff)
parentcf9dc1e0085a1f655628d6c4f8f63dc94da30961 (diff)
downloadchef-e1b721f4d05148edf3619383b9356be3e498436c.tar.gz
Merge pull request #6813 from chef/appveyor_chef13
Backport the powershell spec fix to get Appveyor green again
-rw-r--r--spec/functional/mixin/powershell_out_spec.rb26
1 files changed, 5 insertions, 21 deletions
diff --git a/spec/functional/mixin/powershell_out_spec.rb b/spec/functional/mixin/powershell_out_spec.rb
index 7fc8dc5957..d6fba5b084 100644
--- a/spec/functional/mixin/powershell_out_spec.rb
+++ b/spec/functional/mixin/powershell_out_spec.rb
@@ -1,5 +1,5 @@
#
-# Copyright:: Copyright 2014-2016, Chef Software, Inc.
+# Copyright:: Copyright 2014-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,16 +22,8 @@ describe Chef::Mixin::PowershellOut, windows_only: true do
include Chef::Mixin::PowershellOut
describe "#powershell_out" do
- context "for windows version less than 10", windows_lt_10: true do
- it "runs a powershell command and collects stdout" do
- expect(powershell_out("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+VM\(M\)\s+CPU\(s\)\s+Id\s+/
- end
- end
-
- context "for windows version greater than 10", windows_gte_10: true do
- it "runs a powershell command and collects stdout" do
- expect(powershell_out("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+CPU\(s\)\s+Id\s+SI\s+ProcessName\s+/
- end
+ it "runs a powershell command and collects stdout" do
+ expect(powershell_out("get-process").run_command.stdout).to match /Handles/
end
it "does not raise exceptions when the command is invalid" do
@@ -40,16 +32,8 @@ describe Chef::Mixin::PowershellOut, windows_only: true do
end
describe "#powershell_out!" do
- context "for windows version less than 10", windows_lt_10: true do
- it "runs a powershell command and collects stdout" do
- expect(powershell_out!("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+VM\(M\)\s+CPU\(s\)\s+Id\s+/
- end
- end
-
- context "for windows version less than 10", windows_gte_10: true do
- it "runs a powershell command and collects stdout" do
- expect(powershell_out("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+CPU\(s\)\s+Id\s+SI\s+ProcessName\s+/
- end
+ it "runs a powershell command and collects stdout" do
+ expect(powershell_out!("get-process").run_command.stdout).to match /Handles/
end
it "raises exceptions when the command is invalid" do