summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-27 17:04:45 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:52:57 -0700
commit925af9586a0e209a031c46c81225c6925837a49a (patch)
tree0d74b67dab9aca61b9342e2c4a6dc4de67d9c133
parent04965d7d7a9cd34265d41c5870e6043ff24b3e4d (diff)
downloadpuppet-925af9586a0e209a031c46c81225c6925837a49a.tar.gz
puppet-925af9586a0e209a031c46c81225c6925837a49a.tar.xz
puppet-925af9586a0e209a031c46c81225c6925837a49a.zip
(#8663) Disable spec tests for unsupported functionality on Windows
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 <jacob@puppetlabs.com> (cherry picked from commit d9ce88d10707268fe41c8f3ad1166137fe8e202f)
-rwxr-xr-xspec/integration/parser/compiler_spec.rb2
-rwxr-xr-xspec/integration/provider/mount_spec.rb2
-rwxr-xr-xspec/integration/provider/ssh_authorized_key_spec.rb2
-rwxr-xr-xspec/unit/provider/exec/shell_spec.rb2
-rwxr-xr-xspec/unit/provider/ssh_authorized_key/parsed_spec.rb8
-rwxr-xr-xspec/unit/type/ssh_authorized_key_spec.rb6
6 files changed, 11 insertions, 11 deletions
diff --git a/spec/integration/parser/compiler_spec.rb b/spec/integration/parser/compiler_spec.rb
index 51611f888..9f6aae907 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 eb8cc134a..b2e9c4497 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 f7f61ab25..252f7bf78 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 4e1f00281..62036a79c 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 8a7fe755c..a7798be54 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 41413763c..db58dc9f3 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(