Merge branch '2.3.x'

Closes gh-22931
This commit is contained in:
Stephane Nicoll
2020-08-13 11:49:03 +02:00
2 changed files with 8 additions and 1 deletions

View File

@@ -140,6 +140,12 @@ class PrometheusMetricsExportAutoConfigurationTests {
.hasBean("customEndpoint").hasSingleBean(PrometheusScrapeEndpoint.class));
}
@Test
void pushGatewayIsNotConfiguredWhenEnabledFlagIsNotSet() {
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
.run((context) -> assertThat(context).doesNotHaveBean(PrometheusPushGatewayManager.class));
}
@Test
void withPushGatewayEnabled(CapturedOutput output) {
this.contextRunner.withConfiguration(AutoConfigurations.of(ManagementContextAutoConfiguration.class))