The mount, shell, and ssh_authorized_key types are not supported on
Windows, so these spec tests have been disabled when running on
Windows.

One of the compiler spec tests fails on Windows because
Puppet::Util.execute attempts to execute a program named "git rev-parse
HEAD". This has different semantics than Unix, where the command is
splatted, Kernel.exec(*command). Since this truly is a Windows bug, I
removed the fails_on_windows tag and updated ticket #8410.

Reviewed-by: Jacob Helwig <ja...@puppetlabs.com>
Signed-off-by: Josh Cooper <j...@puppetlabs.com>
---
Local-branch: ticket/master/8663-windows-spec-tests
 spec/integration/parser/compiler_spec.rb           |    2 +-
 spec/integration/provider/mount_spec.rb            |    2 +-
 .../provider/ssh_authorized_key_spec.rb            |    2 +-
 spec/unit/provider/exec/shell_spec.rb              |    2 +-
 .../provider/ssh_authorized_key/parsed_spec.rb     |    8 ++++----
 spec/unit/type/ssh_authorized_key_spec.rb          |    6 +++---
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/spec/integration/parser/compiler_spec.rb 
b/spec/integration/parser/compiler_spec.rb
index 51611f8..9f6aae9 100755
--- a/spec/integration/parser/compiler_spec.rb
+++ b/spec/integration/parser/compiler_spec.rb
@@ -13,7 +13,7 @@ describe Puppet::Parser::Compiler do
     Puppet.settings.clear
   end
 
-  it "should be able to determine the configuration version from a local 
version control repository", :fails_on_windows => true do
+  it "should be able to determine the configuration version from a local 
version control repository" do
     # This should always work, because we should always be
     # in the puppet repo when we run this.
     version = %x{git rev-parse HEAD}.chomp
diff --git a/spec/integration/provider/mount_spec.rb 
b/spec/integration/provider/mount_spec.rb
index eb8cc13..b2e9c44 100755
--- a/spec/integration/provider/mount_spec.rb
+++ b/spec/integration/provider/mount_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
 
 require 'puppet/file_bucket/dipper'
 
-describe "mount provider (integration)", :fails_on_windows => true do
+describe "mount provider (integration)", :unless => 
Puppet.features.microsoft_windows? do
   include PuppetSpec::Files
 
   def create_fake_fstab(initially_contains_entry)
diff --git a/spec/integration/provider/ssh_authorized_key_spec.rb 
b/spec/integration/provider/ssh_authorized_key_spec.rb
index f7f61ab..252f7bf 100755
--- a/spec/integration/provider/ssh_authorized_key_spec.rb
+++ b/spec/integration/provider/ssh_authorized_key_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require 'puppet/file_bucket/dipper'
 
-describe "ssh_authorized_key provider (integration)", :fails_on_windows => 
true do
+describe "ssh_authorized_key provider (integration)", :unless => 
Puppet.features.microsoft_windows? do
   include PuppetSpec::Files
 
   before :each do
diff --git a/spec/unit/provider/exec/shell_spec.rb 
b/spec/unit/provider/exec/shell_spec.rb
index 4e1f002..62036a7 100755
--- a/spec/unit/provider/exec/shell_spec.rb
+++ b/spec/unit/provider/exec/shell_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
 
 provider_class = Puppet::Type.type(:exec).provider(:shell)
 
-describe provider_class, :fails_on_windows => true do
+describe provider_class, :unless => Puppet.features.microsoft_windows? do
   before :each do
     @resource = Puppet::Resource.new(:exec, 'foo')
     @provider = provider_class.new(@resource)
diff --git a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb 
b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
index 8a7fe75..a7798be 100755
--- a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
+++ b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
@@ -5,7 +5,7 @@ require 'puppet_spec/files'
 
 provider_class = Puppet::Type.type(:ssh_authorized_key).provider(:parsed)
 
-describe provider_class do
+describe provider_class, :unless => Puppet.features.microsoft_windows? do
   include PuppetSpec::Files
 
   before :each do
@@ -77,7 +77,7 @@ describe provider_class do
   end
 end
 
-describe provider_class do
+describe provider_class, :unless => Puppet.features.microsoft_windows? do
   before :each do
     @resource = Puppet::Type.type(:ssh_authorized_key).new(:name => "foo", 
:user => "random_bob")
 
@@ -128,7 +128,7 @@ describe provider_class do
       end
     end
 
-    describe "and a user has been specified with no target", :fails_on_windows 
=> true do
+    describe "and a user has been specified with no target" do
       before :each do
         @resource[:user] = "nobody"
         #
@@ -189,7 +189,7 @@ describe provider_class do
       end
     end
 
-    describe "and a invalid user has been specified with no target", 
:fails_on_windows => true do
+    describe "and a invalid user has been specified with no target" do
       it "should catch an exception and raise a Puppet error" do
         @resource[:user] = "thisusershouldnotexist"
 
diff --git a/spec/unit/type/ssh_authorized_key_spec.rb 
b/spec/unit/type/ssh_authorized_key_spec.rb
index 4141376..db58dc9 100755
--- a/spec/unit/type/ssh_authorized_key_spec.rb
+++ b/spec/unit/type/ssh_authorized_key_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
 
 ssh_authorized_key = Puppet::Type.type(:ssh_authorized_key)
 
-describe ssh_authorized_key do
+describe ssh_authorized_key, :unless => Puppet.features.microsoft_windows? do
   include PuppetSpec::Files
 
   before do
@@ -182,7 +182,7 @@ describe ssh_authorized_key do
         proc { @class.new(:name => "whev", :type => :rsa, :target => 
"/tmp/here") }.should_not raise_error
       end
 
-      it "should use the user's path if not explicitly specified", 
:fails_on_windows => true do
+      it "should use the user's path if not explicitly specified" do
         @class.new(:name => "whev", :user => 'root').should(:target).should == 
File.expand_path("~root/.ssh/authorized_keys")
       end
 
@@ -228,7 +228,7 @@ describe ssh_authorized_key do
   end
 
 
-  describe "when user is specified", :unless => 
Puppet.features.microsoft_windows? do
+  describe "when user is specified" do
 
     it "should determine target" do
       resource = @class.create(
-- 
1.7.5.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to