diff options
author | Tim Smith <tsmith@chef.io> | 2017-09-11 10:11:24 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-09-11 10:15:07 -0700 |
commit | 0381f4d31dcd55a316251891d4765e52d3ace636 (patch) | |
tree | 6f7aff5f97a246d4984b0ab7012e2bc7fad8deae | |
parent | 81bbd05f13cb8b6f9d5c01bcf993ac1e5cd5eaff (diff) | |
download | chef-0381f4d31dcd55a316251891d4765e52d3ace636.tar.gz |
Pull in updates from jdunn's PRbootstrap_deprecations
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 2 | ||||
-rw-r--r-- | spec/unit/knife/bootstrap_spec.rb | 20 |
2 files changed, 3 insertions, 19 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index b2f2d63f16..c05957c8bc 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -288,7 +288,7 @@ class Chef end def bootstrap_template - # + # Allow passing a bootstrap template or use the default # @return [String] The CLI specific bootstrap template or the default config[:bootstrap_template] || default_bootstrap_template end diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb index 736ff9b099..2ac290bb09 100644 --- a/spec/unit/knife/bootstrap_spec.rb +++ b/spec/unit/knife/bootstrap_spec.rb @@ -84,24 +84,8 @@ describe Chef::Knife::Bootstrap do end end - context "with :distro and :bootstrap_template cli options" do - let(:bootstrap_cli_options) { [ "--bootstrap-template", "my-template", "--distro", "other-template" ] } - - it "should select bootstrap template" do - expect(File.basename(knife.bootstrap_template)).to eq("my-template") - end - end - - context "with :distro and :template_file cli options" do - let(:bootstrap_cli_options) { [ "--distro", "my-template", "--template-file", "other-template" ] } - - it "should select bootstrap template" do - expect(File.basename(knife.bootstrap_template)).to eq("other-template") - end - end - context "with :bootstrap_template and :template_file cli options" do - let(:bootstrap_cli_options) { [ "--bootstrap-template", "my-template", "--template-file", "other-template" ] } + let(:bootstrap_cli_options) { [ "--bootstrap-template", "my-template", "other-template" ] } it "should select bootstrap template" do expect(File.basename(knife.bootstrap_template)).to eq("my-template") @@ -235,7 +219,7 @@ describe Chef::Knife::Bootstrap do end end - ["-d", "--distro", "-t", "--bootstrap-template", "--template-file"].each do |t| + ["-t", "--bootstrap-template"].each do |t| context "when #{t} option is given in the command line" do it "sets the knife :bootstrap_template config" do knife.parse_options([t, "blahblah"]) |