refactor: simplify ingest app boundaries
This commit is contained in:
@@ -125,10 +125,6 @@ lingniu:
|
||||
path: ${SINK_ARCHIVE_PATH:./archive/}
|
||||
event-history:
|
||||
enabled: false
|
||||
vehicle-state:
|
||||
enabled: false
|
||||
vehicle-stat:
|
||||
enabled: false
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
|
||||
@@ -49,9 +49,7 @@ class Gb32960IngestAppCompositionTest {
|
||||
"lingniu.ingest.sink.mq.consumer.enabled=false",
|
||||
"lingniu.ingest.sink.archive.enabled=true",
|
||||
"lingniu.ingest.sink.archive.path=target/test-archive-gb32960",
|
||||
"lingniu.ingest.event-history.enabled=false",
|
||||
"lingniu.ingest.vehicle-state.enabled=false",
|
||||
"lingniu.ingest.vehicle-stat.enabled=false");
|
||||
"lingniu.ingest.event-history.enabled=false");
|
||||
|
||||
@Test
|
||||
void createsGb32960ListenerWithoutHistoryStorageBoundaries() {
|
||||
|
||||
@@ -49,14 +49,17 @@ class Gb32960IngestAppDefaultsTest {
|
||||
.containsEntry("lingniu.ingest.identity.mysql.table-name",
|
||||
"${VEHICLE_IDENTITY_MYSQL_TABLE:vehicle_identity_bindings}")
|
||||
.containsEntry("lingniu.ingest.event-history.enabled", false)
|
||||
.containsEntry("lingniu.ingest.vehicle-state.enabled", false)
|
||||
.containsEntry("lingniu.ingest.vehicle-stat.enabled", false)
|
||||
.containsEntry("management.endpoints.web.exposure.include",
|
||||
"health,info,metrics,prometheus,gb32960sessions");
|
||||
|
||||
assertThat(properties.stringPropertyNames())
|
||||
.noneMatch(name -> name.startsWith("lingniu.ingest.event-file-store."));
|
||||
assertThat(applicationYaml()).doesNotContain("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-stat."));
|
||||
assertThat(applicationYaml())
|
||||
.doesNotContain("event-file-store:")
|
||||
.doesNotContain("vehicle-state:")
|
||||
.doesNotContain("vehicle-stat:");
|
||||
assertThat(applicationYaml())
|
||||
.contains("password: ${GB32960_PLATFORM_PWD_HYUNDAI:}")
|
||||
.contains("password: ${GB32960_PLATFORM_PWD_YUEJIN:}");
|
||||
|
||||
@@ -85,10 +85,6 @@ lingniu:
|
||||
enabled: false
|
||||
event-history:
|
||||
enabled: false
|
||||
vehicle-state:
|
||||
enabled: false
|
||||
vehicle-stat:
|
||||
enabled: false
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
|
||||
@@ -48,9 +48,7 @@ class Jt808IngestAppCompositionTest {
|
||||
"lingniu.ingest.sink.mq.consumer.enabled=false",
|
||||
"lingniu.ingest.sink.archive.enabled=true",
|
||||
"lingniu.ingest.sink.archive.path=target/test-archive-jt808",
|
||||
"lingniu.ingest.event-history.enabled=false",
|
||||
"lingniu.ingest.vehicle-state.enabled=false",
|
||||
"lingniu.ingest.vehicle-stat.enabled=false");
|
||||
"lingniu.ingest.event-history.enabled=false");
|
||||
|
||||
@Test
|
||||
void createsJt808ListenerWithoutHistoryStorageBoundaries() {
|
||||
|
||||
@@ -44,13 +44,16 @@ class Jt808IngestAppDefaultsTest {
|
||||
.containsEntry("lingniu.ingest.identity.mysql.initialize-schema",
|
||||
"${VEHICLE_IDENTITY_MYSQL_INITIALIZE_SCHEMA:true}")
|
||||
.containsEntry("lingniu.ingest.event-history.enabled", false)
|
||||
.containsEntry("lingniu.ingest.vehicle-state.enabled", false)
|
||||
.containsEntry("lingniu.ingest.vehicle-stat.enabled", false)
|
||||
.containsEntry("management.endpoints.web.exposure.include", "health,info,metrics,prometheus");
|
||||
|
||||
assertThat(properties.stringPropertyNames())
|
||||
.noneMatch(name -> name.startsWith("lingniu.ingest.event-file-store."));
|
||||
assertThat(applicationYaml()).doesNotContain("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-stat."));
|
||||
assertThat(applicationYaml())
|
||||
.doesNotContain("event-file-store:")
|
||||
.doesNotContain("vehicle-state:")
|
||||
.doesNotContain("vehicle-stat:");
|
||||
}
|
||||
|
||||
private static Properties applicationProperties() {
|
||||
|
||||
@@ -95,10 +95,6 @@ lingniu:
|
||||
path: ${SINK_ARCHIVE_PATH:./archive/}
|
||||
event-history:
|
||||
enabled: false
|
||||
vehicle-state:
|
||||
enabled: false
|
||||
vehicle-stat:
|
||||
enabled: false
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
|
||||
@@ -51,9 +51,7 @@ class YutongMqttAppCompositionTest {
|
||||
"lingniu.ingest.sink.mq.consumer.enabled=false",
|
||||
"lingniu.ingest.sink.archive.enabled=true",
|
||||
"lingniu.ingest.sink.archive.path=target/test-archive-yutong",
|
||||
"lingniu.ingest.event-history.enabled=false",
|
||||
"lingniu.ingest.vehicle-state.enabled=false",
|
||||
"lingniu.ingest.vehicle-stat.enabled=false");
|
||||
"lingniu.ingest.event-history.enabled=false");
|
||||
|
||||
@Test
|
||||
void createsMqttIngressAndKafkaSinksWithoutHistoryStorage(CapturedOutput output) {
|
||||
|
||||
@@ -38,13 +38,16 @@ class YutongMqttAppDefaultsTest {
|
||||
"${VEHICLE_IDENTITY_MYSQL_TABLE:vehicle_identity_bindings}")
|
||||
.containsEntry("lingniu.ingest.sink.archive.enabled", "${SINK_ARCHIVE_ENABLED:true}")
|
||||
.containsEntry("lingniu.ingest.event-history.enabled", false)
|
||||
.containsEntry("lingniu.ingest.vehicle-state.enabled", false)
|
||||
.containsEntry("lingniu.ingest.vehicle-stat.enabled", false)
|
||||
.containsEntry("management.endpoints.web.exposure.include", "health,info,metrics,prometheus");
|
||||
|
||||
assertThat(properties.stringPropertyNames())
|
||||
.noneMatch(name -> name.startsWith("lingniu.ingest.event-file-store."));
|
||||
assertThat(applicationYaml()).doesNotContain("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-stat."));
|
||||
assertThat(applicationYaml())
|
||||
.doesNotContain("event-file-store:")
|
||||
.doesNotContain("vehicle-state:")
|
||||
.doesNotContain("vehicle-stat:");
|
||||
}
|
||||
|
||||
private static Properties applicationProperties() {
|
||||
|
||||
Reference in New Issue
Block a user