chore: simplify analytics app defaults
This commit is contained in:
@@ -34,8 +34,6 @@ springdoc:
|
|||||||
|
|
||||||
lingniu:
|
lingniu:
|
||||||
ingest:
|
ingest:
|
||||||
gb32960:
|
|
||||||
enabled: false
|
|
||||||
sink:
|
sink:
|
||||||
kafka:
|
kafka:
|
||||||
enabled: ${KAFKA_ENABLED:true}
|
enabled: ${KAFKA_ENABLED:true}
|
||||||
@@ -55,10 +53,6 @@ lingniu:
|
|||||||
group-id: ${KAFKA_GROUP_STAT:vehicle-stat}
|
group-id: ${KAFKA_GROUP_STAT:vehicle-stat}
|
||||||
topics:
|
topics:
|
||||||
- ${KAFKA_TOPIC_JT808_EVENT:vehicle.event.jt808.v1}
|
- ${KAFKA_TOPIC_JT808_EVENT:vehicle.event.jt808.v1}
|
||||||
archive:
|
|
||||||
enabled: false
|
|
||||||
event-history:
|
|
||||||
enabled: false
|
|
||||||
vehicle-stat:
|
vehicle-stat:
|
||||||
enabled: ${VEHICLE_STAT_ENABLED:true}
|
enabled: ${VEHICLE_STAT_ENABLED:true}
|
||||||
zone-id: ${VEHICLE_STAT_ZONE_ID:Asia/Shanghai}
|
zone-id: ${VEHICLE_STAT_ZONE_ID:Asia/Shanghai}
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ class VehicleAnalyticsAppCompositionTest {
|
|||||||
"lingniu.ingest.sink.kafka.bootstrap-servers=localhost:9092",
|
"lingniu.ingest.sink.kafka.bootstrap-servers=localhost:9092",
|
||||||
"lingniu.ingest.sink.kafka.consumer.enabled=false",
|
"lingniu.ingest.sink.kafka.consumer.enabled=false",
|
||||||
"lingniu.ingest.vehicle-stat.enabled=true",
|
"lingniu.ingest.vehicle-stat.enabled=true",
|
||||||
"lingniu.ingest.vehicle-stat.jt808.enabled=true",
|
"lingniu.ingest.vehicle-stat.jt808.enabled=true")
|
||||||
"lingniu.ingest.event-history.enabled=false",
|
|
||||||
"lingniu.ingest.gb32960.enabled=false")
|
|
||||||
.run(context -> {
|
.run(context -> {
|
||||||
assertThat(context).hasSingleBean(VehicleStatRepository.class);
|
assertThat(context).hasSingleBean(VehicleStatRepository.class);
|
||||||
assertThat(context).hasSingleBean(JdbcVehicleStatMetricRepository.class);
|
assertThat(context).hasSingleBean(JdbcVehicleStatMetricRepository.class);
|
||||||
|
|||||||
@@ -22,9 +22,6 @@ class VehicleAnalyticsAppDefaultsTest {
|
|||||||
"spring.config.import[0]",
|
"spring.config.import[0]",
|
||||||
"optional:nacos:${spring.application.name}.${NACOS_CONFIG_FILE_EXTENSION:yml}?group=${NACOS_GROUP:DEFAULT_GROUP}&refreshEnabled=${NACOS_REFRESH_ENABLED:true}")
|
"optional:nacos:${spring.application.name}.${NACOS_CONFIG_FILE_EXTENSION:yml}?group=${NACOS_GROUP:DEFAULT_GROUP}&refreshEnabled=${NACOS_REFRESH_ENABLED:true}")
|
||||||
.containsEntry("spring.cloud.nacos.config.server-addr", "${NACOS_SERVER_ADDR:127.0.0.1:8848}")
|
.containsEntry("spring.cloud.nacos.config.server-addr", "${NACOS_SERVER_ADDR:127.0.0.1:8848}")
|
||||||
.containsEntry("lingniu.ingest.gb32960.enabled", false)
|
|
||||||
.containsEntry("lingniu.ingest.sink.archive.enabled", false)
|
|
||||||
.containsEntry("lingniu.ingest.event-history.enabled", false)
|
|
||||||
.containsEntry("lingniu.ingest.vehicle-stat.enabled", "${VEHICLE_STAT_ENABLED:true}")
|
.containsEntry("lingniu.ingest.vehicle-stat.enabled", "${VEHICLE_STAT_ENABLED:true}")
|
||||||
.containsEntry(
|
.containsEntry(
|
||||||
"lingniu.ingest.vehicle-stat.jt808.enabled",
|
"lingniu.ingest.vehicle-stat.jt808.enabled",
|
||||||
@@ -39,12 +36,18 @@ class VehicleAnalyticsAppDefaultsTest {
|
|||||||
.containsEntry("management.endpoints.web.exposure.include", "health,info,metrics,prometheus");
|
.containsEntry("management.endpoints.web.exposure.include", "health,info,metrics,prometheus");
|
||||||
|
|
||||||
assertThat(properties.stringPropertyNames())
|
assertThat(properties.stringPropertyNames())
|
||||||
|
.noneMatch(name -> name.startsWith("lingniu.ingest.gb32960."))
|
||||||
|
.noneMatch(name -> name.startsWith("lingniu.ingest.event-history."))
|
||||||
|
.noneMatch(name -> name.startsWith("lingniu.ingest.sink.archive."))
|
||||||
.noneMatch(name -> name.startsWith("lingniu.ingest.event-file-store."))
|
.noneMatch(name -> name.startsWith("lingniu.ingest.event-file-store."))
|
||||||
.noneMatch(name -> name.startsWith("lingniu.ingest.vehicle-state."))
|
.noneMatch(name -> name.startsWith("lingniu.ingest.vehicle-state."))
|
||||||
.noneMatch(name -> name.contains("vehicleStateEnvelopeConsumerProcessor"))
|
.noneMatch(name -> name.contains("vehicleStateEnvelopeConsumerProcessor"))
|
||||||
.noneMatch(name -> name.startsWith("spring.data.redis."))
|
.noneMatch(name -> name.startsWith("spring.data.redis."))
|
||||||
.noneMatch(name -> name.startsWith("management.health.redis."));
|
.noneMatch(name -> name.startsWith("management.health.redis."));
|
||||||
assertThat(applicationYaml())
|
assertThat(applicationYaml())
|
||||||
|
.doesNotContain("gb32960:")
|
||||||
|
.doesNotContain("event-history:")
|
||||||
|
.doesNotContain("archive:")
|
||||||
.doesNotContain("event-file-store:")
|
.doesNotContain("event-file-store:")
|
||||||
.doesNotContain("vehicle-state:")
|
.doesNotContain("vehicle-state:")
|
||||||
.doesNotContain("vehicleStateEnvelopeConsumerProcessor")
|
.doesNotContain("vehicleStateEnvelopeConsumerProcessor")
|
||||||
|
|||||||
Reference in New Issue
Block a user