summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-09-12 23:12:08 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-10-02 11:57:50 -0700
commit2735cf36f6b810a79371aa0e4735634001e7ddf9 (patch)
tree449b6ea7821227b8cc94c5e46d61816b1697c43b /spec/integration
parent75ac2c3345e1dcf238c8c9fa7c188294439262a1 (diff)
downloadchef-2735cf36f6b810a79371aa0e4735634001e7ddf9.tar.gz
Add client start_chef_zero test
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/client/client_spec.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
new file mode 100644
index 0000000000..321fa49d5b
--- /dev/null
+++ b/spec/integration/client/client_spec.rb
@@ -0,0 +1,31 @@
+require 'support/shared/integration/integration_helper'
+require 'chef/mixin/shell_out'
+
+describe "chef-client" do
+ extend IntegrationSupport
+ include Chef::Mixin::ShellOut
+
+ context "with a no-op recipe in the run_list" do
+
+ when_the_repository "has a cookbook with a no-op recipe" do
+ file 'cookbooks/x/recipes/default.rb', ''
+
+ it "should complete with success" do
+ file 'config/client.rb', <<EOM
+start_chef_zero true
+client_key "#{path_to('config/client.pem')}"
+validation_key nil
+cookbook_path "#{path_to('cookbooks')}"
+checksum_path "#{path_to('config/checksums')}"
+file_cache_path "#{path_to('config/cache')}"
+file_backup_path "#{path_to('config/backup')}"
+EOM
+
+ chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..", "bin")
+ result = shell_out("chef-client -c \"#{path_to('config/client.rb')}\" -o 'x::default' -l debug", :cwd => chef_dir)
+ result.error!
+ end
+
+ end
+ end
+end