summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJulian C. Dunn <jdunn@getchef.com>2014-06-30 13:35:07 -0400
committerJulian C. Dunn <jdunn@getchef.com>2014-06-30 13:35:07 -0400
commit1ee424ed7540414f0b8297bad1058cfd887f6aac (patch)
tree9414e1bf73075c425f4685357898e7d989a204e1 /spec
parent2ed829e661f9a357fc9a8cdf316c84f077dad7f9 (diff)
downloadchef-1ee424ed7540414f0b8297bad1058cfd887f6aac.tar.gz
Make sure to call chef-client and knife that we just built, notbtm/fix-hardcoded-binaries
just some random ones hanging around in $PATH.
Diffstat (limited to 'spec')
-rw-r--r--spec/integration/client/ipv6_spec.rb2
-rw-r--r--spec/integration/knife/cookbook_api_ipv6_spec.rb5
2 files changed, 4 insertions, 3 deletions
diff --git a/spec/integration/client/ipv6_spec.rb b/spec/integration/client/ipv6_spec.rb
index bb4889b0fa..ce2793586d 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[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 ad7d5e857f..d1284b65bf 100644
--- a/spec/integration/knife/cookbook_api_ipv6_spec.rb
+++ b/spec/integration/knife/cookbook_api_ipv6_spec.rb
@@ -62,6 +62,7 @@ END_VALIDATION_PEM
end
let(:chef_dir) { File.join(File.dirname(__FILE__), "..", "..", "..", "bin") }
+ let(:knife) { "ruby #{chef_dir}/knife" }
let(:knife_config_flag) { "-c '#{path_to("config/knife.rb")}'" }
@@ -88,7 +89,7 @@ END_CLIENT_RB
end
it "successfully uploads a cookbook" do
- shell_out!("knife cookbook upload apache2 #{knife_config_flag}", :cwd => chef_dir)
+ shell_out!("#{knife} cookbook upload apache2 #{knife_config_flag}", :cwd => chef_dir)
versions_list_json = Chef::HTTP::Simple.new("http://[::1]:8900").get("/cookbooks/apache2", "accept" => "application/json")
versions_list = Chef::JSONCompat.from_json(versions_list_json)
versions_list["apache2"]["versions"].should_not be_empty
@@ -96,7 +97,7 @@ END_CLIENT_RB
context "and the cookbook has been uploaded to the server" do
before do
- shell_out!("knife cookbook upload apache2 #{knife_config_flag}", :cwd => chef_dir)
+ shell_out!("#{knife} cookbook upload apache2 #{knife_config_flag}", :cwd => chef_dir)
end
it "downloads the cookbook" do