Skip to content

Commit

Permalink
Merge pull request #34729 from Ferioney
Browse files Browse the repository at this point in the history
* pr/34729:
  Polish "Fix hint to include all Liquibase resources in default location"
  Fix hint to include all Liquibase resources in default location

Closes gh-34729
  • Loading branch information
snicoll committed Apr 11, 2023
2 parents 308e527 + 03d42de commit 164ab51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static class LiquibaseAutoConfigurationRuntimeHints implements RuntimeHintsRegis

@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
hints.resources().registerPattern("db/changelog/db.changelog-master.yaml");
hints.resources().registerPattern("db/changelog/*");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,10 @@ void whenCustomSpringLiquibaseIsDefinedThenJooqDslContextDependsOnSpringLiquibas
void shouldRegisterHints() {
RuntimeHints hints = new RuntimeHints();
new LiquibaseAutoConfigurationRuntimeHints().registerHints(hints, getClass().getClassLoader());
assertThat(RuntimeHintsPredicates.resource().forResource("db/changelog/")).accepts(hints);
assertThat(RuntimeHintsPredicates.resource().forResource("db/changelog/db.changelog-master.yaml"))
.accepts(hints);
assertThat(RuntimeHintsPredicates.resource().forResource("db/changelog/tables/init.sql")).accepts(hints);
}

private ContextConsumer<AssertableApplicationContext> assertLiquibase(Consumer<SpringLiquibase> consumer) {
Expand Down

0 comments on commit 164ab51

Please sign in to comment.