Rename Testcontainers bean startup property
Old name: spring.testcontainers.startup New name: spring.testcontainers.beans.startup Closes gh-37073
This commit is contained in:
@@ -61,7 +61,7 @@ public enum TestcontainersStartup {
|
||||
* The {@link Environment} property used to change the {@link TestcontainersStartup}
|
||||
* strategy.
|
||||
*/
|
||||
public static final String PROPERTY = "spring.testcontainers.startup";
|
||||
public static final String PROPERTY = "spring.testcontainers.beans.startup";
|
||||
|
||||
abstract void start(Collection<? extends Startable> startables);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "spring.testcontainers.startup",
|
||||
"name": "spring.testcontainers.beans.startup",
|
||||
"type": "org.springframework.boot.testcontainers.lifecycle.TestcontainersStartup",
|
||||
"description": "Testcontainers startup modes.",
|
||||
"defaultValue": "sequential"
|
||||
|
||||
@@ -114,7 +114,7 @@ class TestcontainersLifecycleApplicationContextInitializerTests {
|
||||
AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
|
||||
applicationContext.getEnvironment()
|
||||
.getPropertySources()
|
||||
.addLast(new MapPropertySource("test", Map.of("spring.testcontainers.startup", "parallel")));
|
||||
.addLast(new MapPropertySource("test", Map.of("spring.testcontainers.beans.startup", "parallel")));
|
||||
new TestcontainersLifecycleApplicationContextInitializer().initialize(applicationContext);
|
||||
AbstractBeanFactory beanFactory = (AbstractBeanFactory) applicationContext.getBeanFactory();
|
||||
BeanPostProcessor beanPostProcessor = beanFactory.getBeanPostProcessors()
|
||||
|
||||
@@ -82,7 +82,7 @@ class TestcontainersStartupTests {
|
||||
MockEnvironment environment = new MockEnvironment();
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> TestcontainersStartup.get(environment.withProperty(PROPERTY, "bad")))
|
||||
.withMessage("Unknown 'spring.testcontainers.startup' property value 'bad'");
|
||||
.withMessage("Unknown 'spring.testcontainers.beans.startup' property value 'bad'");
|
||||
}
|
||||
|
||||
private List<TestStartable> createTestStartables(int size) {
|
||||
|
||||
Reference in New Issue
Block a user