summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-01-29 17:43:02 -0800
committerTim Smith <tsmith@chef.io>2018-01-30 15:59:58 -0800
commitcf9dc1e0085a1f655628d6c4f8f63dc94da30961 (patch)
treeebf2faf1ae59c2c6a4b277123c09565e02540da3
parent94ce3359c2700b19bb74cab64de9f5f59c13ca73 (diff)
downloadchef-cf9dc1e0085a1f655628d6c4f8f63dc94da30961.tar.gz
the format of this flametest doesn't matter
we don't need to test the exact output of this powershell command, just get literally anything that looks like it ran successfully. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-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