Skip to content

Commit

Permalink
Merge pull request #78 from ripienaar/75.1
Browse files Browse the repository at this point in the history
(#75) also do not complain about deprecated options anymore
  • Loading branch information
ripienaar authored Dec 15, 2020
2 parents c6a0282 + d8f0eb1 commit 9f7abda
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions lib/mcollective/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ def loadconfig(configfile) # rubocop:disable Metrics/MethodLength
@default_batch_size = Integer(val)
when "default_batch_sleep_time"
@default_batch_sleep_time = Float(val)
when "topicprefix", "topicsep", "queueprefix", "rpchelptemplate", "helptemplatedir", "registration_splay", "registerinterval", "registration_collective", "registration"
Log.warn("Use of deprecated '#{key}' option. This option is ignored and should be removed from '#{configfile}'")
else
# server config might now be choria config which will divirge from mcollective
# in time, so we only raise this error when it looks like we aren't loading
Expand Down
14 changes: 0 additions & 14 deletions spec/unit/mcollective/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,6 @@ module MCollective
end
end

it 'should log a warning when using a deprecated option' do
PluginManager.stubs(:loadclass)
PluginManager.stubs("<<")

["topicprefix", "topicsep", "queueprefix", "rpchelptemplate", "helptemplatedir"].each do |key|
File.expects(:exist?).with("/nonexisting").returns(true)
File.expects(:readlines).with("/nonexisting").returns(["#{key} = nan", "libdir = /nonexistinglib"])

Log.stubs(:warn)
Log.expects(:warn).with("Use of deprecated '#{key}' option. This option is ignored and should be removed from '/nonexisting'")
Config.instance.loadconfig("/nonexisting")
end
end

it 'should enable agents by default' do
File.expects(:readlines).with("/nonexisting").returns(["libdir=/nonexistinglib"])
File.expects(:exist?).with("/nonexisting").returns(true)
Expand Down

0 comments on commit 9f7abda

Please sign in to comment.