diff options
author | danielsdeleo <dan@chef.io> | 2015-09-24 10:08:59 -0700 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2015-09-24 12:37:26 -0700 |
commit | 33509c1bbb7366d3e2a50f61d8d53161e51eb6fa (patch) | |
tree | 87c71e0b6b30214ee0ab675255f75f2cc71ba1cb /spec/unit/knife/bootstrap/client_builder_spec.rb | |
parent | 14d7baab6365e0b4146990a5306f80a7f0d09a82 (diff) | |
download | chef-33509c1bbb7366d3e2a50f61d8d53161e51eb6fa.tar.gz |
Add policyfile attributes to client builderpolicyfile-bootstrap-integration
Diffstat (limited to 'spec/unit/knife/bootstrap/client_builder_spec.rb')
-rw-r--r-- | spec/unit/knife/bootstrap/client_builder_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/knife/bootstrap/client_builder_spec.rb b/spec/unit/knife/bootstrap/client_builder_spec.rb index 930ae8c9d3..e7232fe8d6 100644 --- a/spec/unit/knife/bootstrap/client_builder_spec.rb +++ b/spec/unit/knife/bootstrap/client_builder_spec.rb @@ -190,5 +190,16 @@ describe Chef::Knife::Bootstrap::ClientBuilder do expect(node).to receive(:run_list).with([]) client_builder.run end + + it "builds a node with policy_name and policy_group when given" do + knife_config[:policy_name] = "my-app" + knife_config[:policy_group] = "staging" + + expect(node).to receive(:run_list).with([]) + expect(node).to receive(:policy_name=).with("my-app") + expect(node).to receive(:policy_group=).with("staging") + + client_builder.run + end end end |