summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2015-11-05 17:29:18 -0800
committerdanielsdeleo <dan@chef.io>2015-11-05 17:29:18 -0800
commit2e9789882242f62d60dc687a68b31c4b2488def7 (patch)
tree64751578e09d6c76519e5cb99deb0a45edaeb2c8 /spec/unit
parent2e09c06915ca8602223d83bf351d439d5c7e9e4f (diff)
downloadchef-2e9789882242f62d60dc687a68b31c4b2488def7.tar.gz
Handle nil run list option in knife bootstrapnil-run-list-bootstrap
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/knife/bootstrap_spec.rb15
1 files changed, 15 insertions, 0 deletions
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