refactor: trim disabled file storage deployment

This commit is contained in:
lingniu
2026-07-01 02:22:25 +08:00
parent 356be9fc98
commit 990c675e16
4 changed files with 2 additions and 40 deletions

View File

@@ -136,22 +136,4 @@ class VehicleStatAutoConfigurationTest {
});
}
@Test
void ignoresFileRepositoryTypeAndKeepsJdbcMetricRepository() {
new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(
JdbcTemplateAutoConfiguration.class,
VehicleStatAutoConfiguration.class))
.withBean(DataSource.class, () -> new DriverManagerDataSource(
"jdbc:h2:mem:vehicle_stat_file_mode;MODE=MySQL;DATABASE_TO_LOWER=TRUE;DB_CLOSE_DELAY=-1",
"sa",
""))
.withPropertyValues(
"lingniu.ingest.vehicle-stat.enabled=true",
"lingniu.ingest.vehicle-stat.repository-type=file")
.run(context -> {
assertThat(context).hasSingleBean(VehicleStatRepository.class);
assertThat(context).hasSingleBean(JdbcVehicleStatMetricRepository.class);
});
}
}