mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish "Look in correct context when finding Liquibase beans"
See gh-22681
This commit is contained in:
parent
62156810cf
commit
59b1df4548
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -62,6 +62,17 @@ class LiquibaseEndpointTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void liquibaseReportIsReturnedForContextHierarchy() {
|
||||
this.contextRunner.withUserConfiguration().run((parent) -> {
|
||||
this.contextRunner.withUserConfiguration(Config.class).withParent(parent).run((context) -> {
|
||||
Map<String, LiquibaseBean> liquibaseBeans = context.getBean(LiquibaseEndpoint.class).liquibaseBeans()
|
||||
.getContexts().get(parent.getId()).getLiquibaseBeans();
|
||||
assertThat(liquibaseBeans.get("liquibase").getChangeSets()).hasSize(1);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void invokeWithCustomSchema() {
|
||||
this.contextRunner.withUserConfiguration(Config.class)
|
||||
|
Loading…
Reference in New Issue
Block a user