summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Doherty <randomcamel@users.noreply.github.com>2014-09-16 10:17:21 -0700
committerChris Doherty <randomcamel@users.noreply.github.com>2014-09-16 10:17:21 -0700
commit1f8e295bb4eff78b78497d94b0699c9d61acb4ae (patch)
tree82a67f03cd76fbaf0933aa1511959bec61fae023
parent433d03116693d094469ed798108ee7868cc6d460 (diff)
parent6a0256af047749e7be029dc52bf737fea6e23ef4 (diff)
downloadchef-1f8e295bb4eff78b78497d94b0699c9d61acb4ae.tar.gz
Merge pull request #2059 from opscode/fix-integrations
Fix a bunch of integration tests so they pass on Windows--almost all adding single quotes around paths with spaces.
-rw-r--r--spec/integration/client/client_spec.rb2
-rw-r--r--spec/integration/client/ipv6_spec.rb2
-rw-r--r--spec/integration/knife/cookbook_api_ipv6_spec.rb2
-rw-r--r--spec/integration/recipes/lwrp_inline_resources_spec.rb2
-rw-r--r--spec/support/shared/integration/integration_helper.rb5
5 files changed, 8 insertions, 5 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index 8a1a65249b..0144ae0ce3 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -16,7 +16,7 @@ describe "chef-client" do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "ruby #{chef_dir}/chef-client" }
+ let(:chef_client) { "ruby '#{chef_dir}/chef-client'" }
when_the_repository "has a cookbook with a no-op recipe" do
before { file 'cookbooks/x/recipes/default.rb', '' }
diff --git a/spec/integration/client/ipv6_spec.rb b/spec/integration/client/ipv6_spec.rb
index f49b7b7711..76dd1938f7 100644
--- a/spec/integration/client/ipv6_spec.rb
+++ b/spec/integration/client/ipv6_spec.rb
@@ -76,7 +76,7 @@ END_CLIENT_RB
let(:chef_dir) { File.join(File.dirname(__FILE__), "..", "..", "..", "bin") }
- let(:chef_client_cmd) { %Q[ruby #{chef_dir}/chef-client -c "#{path_to('config/client.rb')}" -lwarn] }
+ let(:chef_client_cmd) { %Q[ruby '#{chef_dir}/chef-client' -c "#{path_to('config/client.rb')}" -lwarn] }
after do
FileUtils.rm_rf(cache_path)
diff --git a/spec/integration/knife/cookbook_api_ipv6_spec.rb b/spec/integration/knife/cookbook_api_ipv6_spec.rb
index 4191bb1731..c5b5b81abe 100644
--- a/spec/integration/knife/cookbook_api_ipv6_spec.rb
+++ b/spec/integration/knife/cookbook_api_ipv6_spec.rb
@@ -62,7 +62,7 @@ END_VALIDATION_PEM
end
let(:chef_dir) { File.join(File.dirname(__FILE__), "..", "..", "..", "bin") }
- let(:knife) { "ruby #{chef_dir}/knife" }
+ let(:knife) { "ruby '#{chef_dir}/knife'" }
let(:knife_config_flag) { "-c '#{path_to("config/knife.rb")}'" }
diff --git a/spec/integration/recipes/lwrp_inline_resources_spec.rb b/spec/integration/recipes/lwrp_inline_resources_spec.rb
index 9e2cf3fc8d..a0c13da6f7 100644
--- a/spec/integration/recipes/lwrp_inline_resources_spec.rb
+++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb
@@ -16,7 +16,7 @@ describe "LWRPs with inline resources" do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "ruby #{chef_dir}/chef-client" }
+ let(:chef_client) { "ruby '#{chef_dir}/chef-client'" }
when_the_repository "has a cookbook with a nested LWRP" do
before do
diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb
index 465633b9e0..b42f7f69d9 100644
--- a/spec/support/shared/integration/integration_helper.rb
+++ b/spec/support/shared/integration/integration_helper.rb
@@ -118,7 +118,10 @@ module IntegrationSupport
Chef::Config.delete("#{object_name}_path".to_sym)
end
Chef::Config.delete(:chef_repo_path)
- FileUtils.remove_entry_secure(@repository_dir)
+ # TODO: "force" actually means "silence all exceptions". this
+ # silences a weird permissions error on Windows that we should track
+ # down, but for now there's no reason for it to blow up our CI.
+ FileUtils.remove_entry_secure(@repository_dir, force=Chef::Platform.windows?)
ensure
@repository_dir = nil
end