From 2e9789882242f62d60dc687a68b31c4b2488def7 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 5 Nov 2015 17:29:18 -0800 Subject: Handle nil run list option in knife bootstrap --- spec/unit/knife/bootstrap_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'spec/unit/knife') diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb index 342c1878f1..8c5a62e6f0 100644 --- a/spec/unit/knife/bootstrap_spec.rb +++ b/spec/unit/knife/bootstrap_spec.rb @@ -472,6 +472,21 @@ describe Chef::Knife::Bootstrap do end + # https://github.com/chef/chef/issues/4131 + # Arguably a bug in the plugin: it shouldn't be setting this to nil, but it + # worked before, so make it work now. + context "when a plugin sets the run list option to nil" do + + before do + knife.config[:run_list] = nil + end + + it "passes options validation" do + expect { knife.validate_options! }.to_not raise_error + end + + end + end describe "when configuring the underlying knife ssh command" do -- cgit v1.2.1