forked from voxpupuli/puppet-rabbitmq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request voxpupuli#450 from wyardley/master
Fix an issue when $node_ip_address is 'UNSET'.
- Loading branch information
Showing
2 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -432,12 +432,32 @@ | |
should contain_staging__file('rabbitmqadmin').with_source("http://guest:[email protected]:15672/cli/rabbitmqadmin") | ||
end | ||
end | ||
context 'with default $node_ip_address="UNSET" and service_manage set to true' do | ||
let(:params) {{ :admin_enable => true, :node_ip_address => 'UNSET' }} | ||
it 'we enable the admin interface by default' do | ||
should contain_class('rabbitmq::install::rabbitmqadmin') | ||
should contain_rabbitmq_plugin('rabbitmq_management').with( | ||
'require' => 'Class[Rabbitmq::Install]', | ||
'notify' => 'Class[Rabbitmq::Service]' | ||
) | ||
should contain_staging__file('rabbitmqadmin').with_source("http://guest:[email protected]:15672/cli/rabbitmqadmin") | ||
end | ||
end | ||
context 'with service_manage set to true, node_ip_address = "UNSET", and default user/pass specified' do | ||
let(:params) {{ :admin_enable => true, :default_user => 'foobar', :default_pass => 'hunter2', :node_ip_address => 'UNSET' }} | ||
it 'we use the correct URL to rabbitmqadmin' do | ||
should contain_staging__file('rabbitmqadmin').with( | ||
:source => 'http://foobar:[email protected]:15672/cli/rabbitmqadmin', | ||
:curl_option => '-k --retry 30 --retry-delay 6', | ||
) | ||
end | ||
end | ||
context 'with service_manage set to true and default user/pass specified' do | ||
let(:params) {{ :admin_enable => true, :default_user => 'foobar', :default_pass => 'hunter2', :node_ip_address => '1.1.1.1' }} | ||
it 'we use the correct URL to rabbitmqadmin' do | ||
should contain_staging__file('rabbitmqadmin').with( | ||
:source => 'http://foobar:[email protected]:15672/cli/rabbitmqadmin', | ||
:curl_option => '-k --noproxy 1.1.1.1 --retry 30 --retry-delay 6', | ||
:curl_option => '-k --noproxy 1.1.1.1 --retry 30 --retry-delay 6', | ||
) | ||
end | ||
end | ||
|
@@ -447,7 +467,7 @@ | |
it 'we use the correct URL to rabbitmqadmin' do | ||
should contain_staging__file('rabbitmqadmin').with( | ||
:source => 'http://guest:[email protected]:55672/cli/rabbitmqadmin', | ||
:curl_option => '-k --noproxy 1.1.1.1 --retry 30 --retry-delay 6', | ||
:curl_option => '-k --noproxy 1.1.1.1 --retry 30 --retry-delay 6', | ||
) | ||
end | ||
end | ||
|