Update ServiceInstanceRecentLogsAutoConfigurationTests

Trying a different test setup to avoid an NPE in CI.
This commit is contained in:
Roy Clarkson
2025-03-07 11:42:26 -05:00
parent 2f8f0f10b1
commit ce5e6f70e5

View File

@@ -16,6 +16,7 @@
package org.springframework.cloud.appbroker.autoconfigure;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Flux;
@@ -33,12 +34,17 @@ import static org.assertj.core.api.Assertions.assertThat;
class ServiceInstanceRecentLogsAutoConfigurationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(AppBrokerAutoConfiguration.class,
CloudFoundryAppDeployerAutoConfiguration.class, ServiceInstanceRecentLogsAutoConfiguration.class))
.withPropertyValues("spring.cloud.appbroker.deployer.cloudfoundry.api-host=https://api.example.local",
"spring.cloud.appbroker.deployer.cloudfoundry.username=user",
"spring.cloud.appbroker.deployer.cloudfoundry.password=secret");
private ApplicationContextRunner contextRunner;
@BeforeEach
void setUp() {
this.contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(AppBrokerAutoConfiguration.class,
CloudFoundryAppDeployerAutoConfiguration.class, ServiceInstanceRecentLogsAutoConfiguration.class))
.withPropertyValues("spring.cloud.appbroker.deployer.cloudfoundry.api-host=https://api.example.local",
"spring.cloud.appbroker.deployer.cloudfoundry.username=user",
"spring.cloud.appbroker.deployer.cloudfoundry.password=secret");
}
@Test
void servicesAreNotCreatedWithoutLoggingOnClasspath() {