Remove ambiguity in stubbed methods in spec_helper
- Adjust the stubs in spec/spec_helper.rb to specify the appropriate number of expected variables - Add parenthensis around return values Change-Id: Id92fbfad0433fcdcbe0ab6909a0b717d614ac62c Partial-Bug: #1271535
This commit is contained in:
parent
fd84d44de5
commit
6c480393fe
|
@ -26,17 +26,22 @@ require_relative 'support/matcher'
|
|||
|
||||
def block_storage_stubs # rubocop:disable MethodLength
|
||||
::Chef::Recipe.any_instance.stub(:rabbit_servers)
|
||||
.and_return '1.1.1.1:5672,2.2.2.2:5672'
|
||||
::Chef::Recipe.any_instance.stub(:get_password).and_return ''
|
||||
.and_return('1.1.1.1:5672,2.2.2.2:5672')
|
||||
::Chef::Recipe.any_instance.stub(:get_password)
|
||||
.with('service', anything)
|
||||
.and_return('')
|
||||
::Chef::Recipe.any_instance.stub(:get_password)
|
||||
.with('db', anything)
|
||||
.and_return('')
|
||||
::Chef::Recipe.any_instance.stub(:secret)
|
||||
.with('secrets', 'openstack_identity_bootstrap_token')
|
||||
.and_return 'bootstrap-token'
|
||||
.and_return('bootstrap-token')
|
||||
::Chef::Recipe.any_instance.stub(:get_password)
|
||||
.with('user', 'guest')
|
||||
.and_return 'rabbit-pass'
|
||||
.and_return('rabbit-pass')
|
||||
::Chef::Recipe.any_instance.stub(:get_password)
|
||||
.with('service', 'openstack-block-storage')
|
||||
.and_return 'cinder-pass'
|
||||
.and_return('cinder-pass')
|
||||
::Chef::Application.stub(:fatal!)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue