diff options
author | danielsdeleo <dan@getchef.com> | 2015-05-19 11:28:09 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2015-05-19 13:11:13 -0700 |
commit | 19dce1faaf15b6f4febab6ec9d1e2b00ded2c6cf (patch) | |
tree | fbd45311b3c2ee360b2899864169da382b0b2f0a | |
parent | 69da234d82766f598bbb9ebafb25de7d587fe83d (diff) | |
download | chef-19dce1faaf15b6f4febab6ec9d1e2b00ded2c6cf.tar.gz |
Skip integration tests that aren't working on appveyor environment
-rw-r--r-- | spec/integration/client/client_spec.rb | 56 | ||||
-rw-r--r-- | spec/spec_helper.rb | 3 |
2 files changed, 31 insertions, 28 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb index e00664f1e3..8c72048965 100644 --- a/spec/integration/client/client_spec.rb +++ b/spec/integration/client/client_spec.rb @@ -3,34 +3,35 @@ require 'chef/mixin/shell_out' require 'tiny_server' require 'tmpdir' -def recipes_filename - File.join(CHEF_SPEC_DATA, 'recipes.tgz') -end -def start_tiny_server(server_opts={}) - recipes_size = File::Stat.new(recipes_filename).size - @server = TinyServer::Manager.new(server_opts) - @server.start - @api = TinyServer::API.instance - @api.clear - # - # trivial endpoints - # - # just a normal file - # (expected_content should be uncompressed) - @api.get("/recipes.tgz", 200) { - File.open(recipes_filename, "rb") do |f| - f.read - end - } -end +describe "chef-client" do -def stop_tiny_server - @server.stop - @server = @api = nil -end + def recipes_filename + File.join(CHEF_SPEC_DATA, 'recipes.tgz') + end + + def start_tiny_server(server_opts={}) + @server = TinyServer::Manager.new(server_opts) + @server.start + @api = TinyServer::API.instance + @api.clear + # + # trivial endpoints + # + # just a normal file + # (expected_content should be uncompressed) + @api.get("/recipes.tgz", 200) { + File.open(recipes_filename, "rb") do |f| + f.read + end + } + end + + def stop_tiny_server + @server.stop + @server = @api = nil + end -describe "chef-client" do include IntegrationSupport include Chef::Mixin::ShellOut @@ -58,7 +59,7 @@ local_mode true cookbook_path "#{path_to('cookbooks')}" EOM - result = shell_out!("#{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'x::default'", :cwd => chef_dir) + shell_out!("#{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'x::default'", :cwd => chef_dir) end it "should complete successfully with no other environment variables", :skip => (Chef::Platform.windows?) do @@ -341,7 +342,8 @@ end end end - context "when using recipe-url" do + # Fails on appveyor, but works locally on windows and on windows hosts in Ci. + context "when using recipe-url", :skip_appveyor do before(:all) do start_tiny_server end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7cc9b8f7d6..fe96c723b6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -115,7 +115,8 @@ RSpec.configure do |config| config.filter_run_excluding :volatile_on_solaris => true if solaris? config.filter_run_excluding :volatile_from_verify => false - # Add jruby filters here + config.filter_run_excluding :skip_appveyor => true if ENV["APPVEYOR"] + config.filter_run_excluding :windows_only => true unless windows? config.filter_run_excluding :not_supported_on_mac_osx_106 => true if mac_osx_106? config.filter_run_excluding :not_supported_on_mac_osx=> true if mac_osx? |