|
|
@ -231,8 +231,10 @@ class DataSourceInitializationIntegrationTests {
|
|
|
|
"spring.datasource.schema:classpath:does/not/exist.sql").run((context) -> {
|
|
|
|
"spring.datasource.schema:classpath:does/not/exist.sql").run((context) -> {
|
|
|
|
assertThat(context).hasFailed();
|
|
|
|
assertThat(context).hasFailed();
|
|
|
|
assertThat(context.getStartupFailure()).isInstanceOf(BeanCreationException.class);
|
|
|
|
assertThat(context.getStartupFailure()).isInstanceOf(BeanCreationException.class);
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("does/not/exist.sql");
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("[does/not/exist.sql]");
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("spring.datasource.schema");
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("spring.datasource.schema");
|
|
|
|
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining(
|
|
|
|
|
|
|
|
"No resources were found at location 'classpath:does/not/exist.sql'.");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -243,8 +245,10 @@ class DataSourceInitializationIntegrationTests {
|
|
|
|
"spring.datasource.data:classpath:does/not/exist.sql").run((context) -> {
|
|
|
|
"spring.datasource.data:classpath:does/not/exist.sql").run((context) -> {
|
|
|
|
assertThat(context).hasFailed();
|
|
|
|
assertThat(context).hasFailed();
|
|
|
|
assertThat(context.getStartupFailure()).isInstanceOf(BeanCreationException.class);
|
|
|
|
assertThat(context.getStartupFailure()).isInstanceOf(BeanCreationException.class);
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("does/not/exist.sql");
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("[does/not/exist.sql]");
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("spring.datasource.data");
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining("spring.datasource.data");
|
|
|
|
|
|
|
|
assertThat(context.getStartupFailure()).hasMessageContaining(
|
|
|
|
|
|
|
|
"No resources were found at location 'classpath:does/not/exist.sql'.");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|