diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-09-02 20:15:18 +0300 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-09-02 20:15:18 +0300 |
commit | b6f92cf2eac4a8056d8594a94aa026b69e348386 (patch) | |
tree | 357e5a28a8a833465051c982a8336bd2c0a32b74 | |
parent | ef4aef7e6936f4f331f9d13428fbea85a601b00f (diff) | |
parent | 1ee424ed7540414f0b8297bad1058cfd887f6aac (diff) | |
download | chef-b6f92cf2eac4a8056d8594a94aa026b69e348386.tar.gz |
Merge pull request #1583 from juliandunn/fix-hardcoded-binaries
Make sure to call chef-client and knife that we just built
-rw-r--r-- | spec/integration/client/ipv6_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/knife/cookbook_api_ipv6_spec.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/spec/integration/client/ipv6_spec.rb b/spec/integration/client/ipv6_spec.rb index 5e3f7cfb0b..f49b7b7711 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 b3efae6cd3..4191bb1731 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 |