diff options
author | danielsdeleo <dan@chef.io> | 2015-09-22 15:40:34 -0700 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2015-09-24 12:37:26 -0700 |
commit | e92665d448eaaf92fdfb5bb3cdb4be3a2ddad9ac (patch) | |
tree | 63a028fc8b41dbb63e40a71266558812ce5b6e28 /spec/unit/knife | |
parent | efe6286540a56960e109dcc65db63cc7461c1753 (diff) | |
download | chef-e92665d448eaaf92fdfb5bb3cdb4be3a2ddad9ac.tar.gz |
Add policyfile support to bootstrap context
Diffstat (limited to 'spec/unit/knife')
-rw-r--r-- | spec/unit/knife/core/bootstrap_context_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/knife/core/bootstrap_context_spec.rb b/spec/unit/knife/core/bootstrap_context_spec.rb index 268b61c756..a93e5362a9 100644 --- a/spec/unit/knife/core/bootstrap_context_spec.rb +++ b/spec/unit/knife/core/bootstrap_context_spec.rb @@ -117,6 +117,16 @@ EXPECTED end end + describe "when policy_name and policy_group are present in config" do + + let(:config) { { policy_name: "my_app_server", policy_group: "staging" } } + + it "includes them in the first_boot data and excludes run_list" do + expect(Chef::JSONCompat.to_json(bootstrap_context.first_boot)).to eq(Chef::JSONCompat.to_json(config)) + end + + end + describe "when an encrypted_data_bag_secret is provided" do let(:secret) { "supersekret" } it "reads the encrypted_data_bag_secret" do |