Polish "Expose default RabbitMQ credentials in the metadata"
Closes gh-6863
This commit is contained in:
@@ -116,6 +116,20 @@ public class RabbitAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultConnectionFactoryConfiguration() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.run((context) -> {
|
||||
RabbitProperties properties = new RabbitProperties();
|
||||
com.rabbitmq.client.ConnectionFactory rabbitConnectionFactory = getTargetConnectionFactory(
|
||||
context);
|
||||
assertThat(rabbitConnectionFactory.getUsername())
|
||||
.isEqualTo(properties.getUsername());
|
||||
assertThat(rabbitConnectionFactory.getPassword())
|
||||
.isEqualTo(properties.getPassword());
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConnectionFactoryWithOverrides() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
|
||||
Reference in New Issue
Block a user