diff options
| author | Josh Cooper <josh@puppetlabs.com> | 2011-07-22 12:34:05 -0700 |
|---|---|---|
| committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-08-19 13:52:57 -0700 |
| commit | eaa7d92f4017fcdae54e5f6addf1edd3a72fe384 (patch) | |
| tree | 7ab6ded80fbabc86be104fc5a0221299ebfa47ca /spec/integration | |
| parent | 945bf74aad13de37d5ca46961db78a72b8c24029 (diff) | |
| download | puppet-eaa7d92f4017fcdae54e5f6addf1edd3a72fe384.tar.gz puppet-eaa7d92f4017fcdae54e5f6addf1edd3a72fe384.tar.xz puppet-eaa7d92f4017fcdae54e5f6addf1edd3a72fe384.zip | |
Disable spec tests for unsupported functionality on Windows
Ruby does not support creating symlinks on Windows (though Windows does
support them), and since the tidy spec test is designed to reproduce a
specific bug (as opposed to testing symlink functionality on Windows) it
has been disabled.
Ruby on Windows also does not support File.chmod, so the inspect spec
test has been disabled. The general issue of File.chmod on Windows is
something I know needs to be investigated.
Also disabled the cron spec test as this functionality will not be
supported on Windows (instead there will be task manager support).
Re-enable the autoload spec tests as those now pass on Windows (this is
probably due to the cacher changes recently made).
The inventory ssl spec is not supported on Windows and so is disabled.
However, while researching the failure, it was due to
Time.now.strftime("%Z") returning "Pacific Daylight Time" on Windows,
instead of "PDT" like it does on other platforms. As a result, the split
method was sometimes splitting in the wrong place.
As far as I can tell, the inventory code is only called from the CA (to
keep track of serial numbers for certs that it has issued). But it's
something to watch out for on Windows when calling strftime.
Webrick, fileserver and CA functionality are not supported on Windows so
these spec tests are disabled.
Also fix path issue with catalog spec.
Also several spec tests were creating tempfiles manually and calling
system("rm -rf ..."), these have been replaced with
PuppetSpec::Files.tmpdir.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
(cherry picked from commit 75d2e62cab1de7677463c274892f8920cb7e0cbf)
Diffstat (limited to 'spec/integration')
| -rwxr-xr-x | spec/integration/network/server/webrick_spec.rb | 14 | ||||
| -rwxr-xr-x | spec/integration/type/tidy_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/integration/util/autoload_spec.rb | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/spec/integration/network/server/webrick_spec.rb b/spec/integration/network/server/webrick_spec.rb index 2390fcab1..7365462d3 100755 --- a/spec/integration/network/server/webrick_spec.rb +++ b/spec/integration/network/server/webrick_spec.rb @@ -4,7 +4,9 @@ require 'puppet/network/server' require 'puppet/ssl/certificate_authority' require 'socket' -describe Puppet::Network::Server do +describe Puppet::Network::Server, :unless => Puppet.features.microsoft_windows? do + include PuppetSpec::Files + describe "when using webrick" do before :each do Puppet[:servertype] = 'webrick' @@ -12,11 +14,10 @@ describe Puppet::Network::Server do @params = { :port => 34343, :handlers => [ :node ], :xmlrpc_handlers => [ :status ] } # Get a safe temporary file - @tmpfile = Tempfile.new("webrick_integration_testing") - @dir = @tmpfile.path + "_dir" + dir = tmpdir("webrick_integration_testing") - Puppet.settings[:confdir] = @dir - Puppet.settings[:vardir] = @dir + Puppet.settings[:confdir] = dir + Puppet.settings[:vardir] = dir Puppet.settings[:group] = Process.gid Puppet::SSL::Host.ca_location = :local @@ -26,11 +27,8 @@ describe Puppet::Network::Server do end after do - @tmpfile.delete Puppet.settings.clear - system("rm -rf #{@dir}") - Puppet::SSL::Host.ca_location = :none end diff --git a/spec/integration/type/tidy_spec.rb b/spec/integration/type/tidy_spec.rb index 08a24099c..d1bb62d6e 100755 --- a/spec/integration/type/tidy_spec.rb +++ b/spec/integration/type/tidy_spec.rb @@ -12,7 +12,7 @@ describe Puppet::Type.type(:tidy) do end # Testing #355. - it "should be able to remove dead links", :fails_on_windows => true do + it "should be able to remove dead links", :unless => Puppet.features.microsoft_windows? do dir = tmpfile("tidy_link_testing") link = File.join(dir, "link") target = tmpfile("no_such_file_tidy_link_testing") diff --git a/spec/integration/util/autoload_spec.rb b/spec/integration/util/autoload_spec.rb index 771e6a718..92fc6554c 100755 --- a/spec/integration/util/autoload_spec.rb +++ b/spec/integration/util/autoload_spec.rb @@ -94,7 +94,7 @@ describe Puppet::Util::Autoload do } end - it "should be able to load files directly from modules", :fails_on_windows => true do + it "should be able to load files directly from modules" do modulepath = tmpfile("autoload_module_testing") libdir = File.join(modulepath, "mymod", "lib", "foo") FileUtils.mkdir_p(libdir) |
