diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-12-08 18:42:44 -0800 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-12-08 18:45:29 -0800 |
commit | 767531c46719f1274a0d4d210cc3ff9c0f50b97d (patch) | |
tree | b051d4b53673f70657002c55e4afbd43b342c1c1 | |
parent | bc87ec6ecf8eae8ec13a64b97dc1da551b516497 (diff) | |
download | chef-767531c46719f1274a0d4d210cc3ff9c0f50b97d.tar.gz |
Merge pull request #2573 from opscode/sersut/bootstrap-context-arity
Restore compatibility with knife-windows
Conflicts:
CHANGELOG.md
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | lib/chef/knife/core/bootstrap_context.rb | 2 | ||||
-rw-r--r-- | spec/unit/knife/core/bootstrap_context_spec.rb | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5928d7bf90..f3b2f9c7ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 12.0.1 * [Issue 2552](https://github.com/opscode/chef/issues/2552) Create constant for LWRP before calling `provides` * [Issue 2545](https://github.com/opscode/chef/issues/2545) `path` attribute of `execute` resource is restored to provide backwards compatibility with Chef 11. +* [Issue 2565](https://github.com/opscode/chef/issues/2565) Fix `Chef::Knife::Core::BootstrapContext` constructor for knife-windows compat. ## 12.0.0 diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index e681d7a49b..3833182c70 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -30,7 +30,7 @@ class Chef # class BootstrapContext - def initialize(config, run_list, chef_config, secret) + def initialize(config, run_list, chef_config, secret = nil) @config = config @run_list = run_list @chef_config = chef_config diff --git a/spec/unit/knife/core/bootstrap_context_spec.rb b/spec/unit/knife/core/bootstrap_context_spec.rb index cd53088419..6f7adfcf57 100644 --- a/spec/unit/knife/core/bootstrap_context_spec.rb +++ b/spec/unit/knife/core/bootstrap_context_spec.rb @@ -34,6 +34,10 @@ describe Chef::Knife::Core::BootstrapContext do subject(:bootstrap_context) { described_class.new(config, run_list, chef_config, secret) } + it "initializes with Chef 11 parameters" do + expect{described_class.new(config, run_list, chef_config)}.not_to raise_error + end + it "runs chef with the first-boot.json in the _default environment" do bootstrap_context.start_chef.should eq "chef-client -j /etc/chef/first-boot.json -E _default" end |