diff options
author | danielsdeleo <dan@chef.io> | 2016-11-03 10:01:43 -0700 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2016-11-03 13:53:25 -0700 |
commit | 49cc8b15d99216c5fb55b690e8cd22d22e5f359f (patch) | |
tree | 7b650979d7f82f773045b33adfc1a43c00d6a18e /spec | |
parent | 34d2b287c6a7ee0afb303b49054a25fd96f0a30a (diff) | |
download | chef-49cc8b15d99216c5fb55b690e8cd22d22e5f359f.tar.gz |
Enable data collector w/o token for solo, but require explicit URL
Third-party data collector implementations are supported and may not
require a token for authentication. Therefore we must allow the case
where the token is nil in Chef Solo mode. To reduce the chance that the
data collector is accidentally enabled, only set the data collector URL
to a default value in Chef Client mode.
Signed-off-by: Daniel DeLeo <dan@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/data_collector_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/data_collector_spec.rb b/spec/unit/data_collector_spec.rb index 467359a874..fceea3225f 100644 --- a/spec/unit/data_collector_spec.rb +++ b/spec/unit/data_collector_spec.rb @@ -91,8 +91,8 @@ describe Chef::DataCollector do Chef::Config[:solo] = true end - it "returns false" do - expect(Chef::DataCollector.register_reporter?).to be_falsey + it "returns true" do + expect(Chef::DataCollector.register_reporter?).to be(true) end end @@ -104,7 +104,7 @@ describe Chef::DataCollector do end it "returns false" do - expect(Chef::DataCollector.register_reporter?).to be_falsey + expect(Chef::DataCollector.register_reporter?).to be(true) end end |