summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-03-24 16:09:20 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-03-24 16:14:12 -0700
commitc30f5af929b37073eb8950b98e1d6d6f0a2e9d1e (patch)
tree033e8cb40df8ce11260f40da3bf678cfdf4ffa1d
parentc4ec5066313e94368d16a2c37f32973fa75c6191 (diff)
downloadchef-jdm/powershell-cmdlet.tar.gz
Disable Cmdlet tests on old versions of powershelljdm/powershell-cmdlet
cmdlet.rb uses stream redirection, which is not available in powershell 2. Since this is a helper class for our `dsc_script` and `dsc_resource`, this is a fairly safe change. While the verbose stream redirection is currently unused, it will be useful if Invoke-DscResource logs its verbose output to the verbose stream.
-rw-r--r--spec/functional/util/powershell/cmdlet_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/functional/util/powershell/cmdlet_spec.rb b/spec/functional/util/powershell/cmdlet_spec.rb
index b240a5ec12..201fb95af8 100644
--- a/spec/functional/util/powershell/cmdlet_spec.rb
+++ b/spec/functional/util/powershell/cmdlet_spec.rb
@@ -19,7 +19,7 @@
require 'chef/json_compat'
require File.expand_path('../../../../spec_helper', __FILE__)
-describe Chef::Util::Powershell::Cmdlet, :windows_only do
+describe Chef::Util::Powershell::Cmdlet, :windows_powershell_dsc_only do
before(:all) do
ohai = Ohai::System.new
ohai.load_plugins
@@ -88,7 +88,7 @@ describe Chef::Util::Powershell::Cmdlet, :windows_only do
context "when returning json" do
let(:cmd_output_format) { :json }
- it "returns json format data", :windows_powershell_dsc_only do
+ it "returns json format data" do
result = cmdlet_alias_requires_switch_or_argument.run({},{},'ls')
expect(result.succeeded?).to eq(true)
expect(lambda{Chef::JSONCompat.parse(result.return_value)}).not_to raise_error
@@ -97,7 +97,7 @@ describe Chef::Util::Powershell::Cmdlet, :windows_only do
context "when returning Ruby objects" do
let(:cmd_output_format) { :object }
- it "returns object format data", :windows_powershell_dsc_only do
+ it "returns object format data" do
result = simple_cmdlet.run({},{:cwd => etc_directory}, 'hosts')
expect(result.succeeded?).to eq(true)
data = result.return_value