- describe 'rabbitmq-loopback_users by default' do
- it 'sets the loopback_users parameter in the config file' do
- is_expected.to contain_file('rabbitmq.config'). \
- with_content(%r{\{loopback_users, \[<<"guest">>\]\}})
- end
- end
-
- describe 'rabbitmq-loopback_users allow connections via loopback interfaces' do
- let(:params) { { loopback_users: [] } }
-
- it 'sets the loopback_users parameter in the config file' do
- is_expected.to contain_file('rabbitmq.config'). \
- with_content(%r{\{loopback_users, \[\]\}})
- end
- end
-
- describe 'rabbitmq-loopback_users allow connections via loopback interfaces to a group of users' do
- let(:params) { { loopback_users: %w[user1 user2] } }
-
- it 'sets the loopback_users parameter in the config file' do
- is_expected.to contain_file('rabbitmq.config'). \
- with_content(%r{\{loopback_users, \[<<\"user1\">>, <<\"user2\">>\]\}})
- end
- end
-