chore: add yuejin gb32960 platform config
This commit is contained in:
@@ -62,6 +62,9 @@ services:
|
||||
GB32960_PLATFORM_USER_HYUNDAI: ${GB32960_PLATFORM_USER_HYUNDAI:-Hyundai}
|
||||
GB32960_PLATFORM_PWD_HYUNDAI: ${GB32960_PLATFORM_PWD_HYUNDAI:-}
|
||||
GB32960_PLATFORM_IP_HYUNDAI: ${GB32960_PLATFORM_IP_HYUNDAI:-}
|
||||
GB32960_PLATFORM_USER_YUEJIN: ${GB32960_PLATFORM_USER_YUEJIN:-YueJin}
|
||||
GB32960_PLATFORM_PWD_YUEJIN: ${GB32960_PLATFORM_PWD_YUEJIN:-}
|
||||
GB32960_PLATFORM_IP_YUEJIN: ${GB32960_PLATFORM_IP_YUEJIN:-}
|
||||
GB32960_TLS_ENABLED: ${GB32960_TLS_ENABLED:-false}
|
||||
ports:
|
||||
- "${GB32960_HTTP_PORT:-20100}:20100"
|
||||
|
||||
@@ -49,10 +49,15 @@ lingniu:
|
||||
whitelist: []
|
||||
platforms:
|
||||
- username: ${GB32960_PLATFORM_USER_HYUNDAI:Hyundai}
|
||||
password: ${GB32960_PLATFORM_PWD_HYUNDAI:f2e3445d7cda409fb4f278f6fb890734}
|
||||
password: ${GB32960_PLATFORM_PWD_HYUNDAI:}
|
||||
allowed-ips:
|
||||
- ${GB32960_PLATFORM_IP_HYUNDAI:}
|
||||
description: 外部下级平台 - Hyundai
|
||||
- username: ${GB32960_PLATFORM_USER_YUEJIN:YueJin}
|
||||
password: ${GB32960_PLATFORM_PWD_YUEJIN:}
|
||||
allowed-ips:
|
||||
- ${GB32960_PLATFORM_IP_YUEJIN:}
|
||||
description: 外部下级平台 - YueJin
|
||||
tls:
|
||||
enabled: ${GB32960_TLS_ENABLED:false}
|
||||
cert-path: ${GB32960_TLS_CERT:}
|
||||
@@ -64,6 +69,7 @@ lingniu:
|
||||
match:
|
||||
platform-accounts:
|
||||
- Hyundai
|
||||
- YueJin
|
||||
vin-prefixes: []
|
||||
vins: []
|
||||
parse:
|
||||
|
||||
@@ -28,6 +28,18 @@ class Gb32960IngestAppDefaultsTest {
|
||||
.containsEntry("lingniu.ingest.gb32960.enabled", true)
|
||||
.containsEntry("lingniu.ingest.gb32960.server.enabled", true)
|
||||
.containsEntry("lingniu.ingest.gb32960.port", "${GB32960_PORT:32960}")
|
||||
.containsEntry("lingniu.ingest.gb32960.auth.platforms[0].username",
|
||||
"${GB32960_PLATFORM_USER_HYUNDAI:Hyundai}")
|
||||
.containsEntry("lingniu.ingest.gb32960.auth.platforms[0].password",
|
||||
"${GB32960_PLATFORM_PWD_HYUNDAI:}")
|
||||
.containsEntry("lingniu.ingest.gb32960.auth.platforms[1].username",
|
||||
"${GB32960_PLATFORM_USER_YUEJIN:YueJin}")
|
||||
.containsEntry("lingniu.ingest.gb32960.auth.platforms[1].password",
|
||||
"${GB32960_PLATFORM_PWD_YUEJIN:}")
|
||||
.containsEntry("lingniu.ingest.gb32960.vendor-extensions[0].match.platform-accounts[0]",
|
||||
"Hyundai")
|
||||
.containsEntry("lingniu.ingest.gb32960.vendor-extensions[0].match.platform-accounts[1]",
|
||||
"YueJin")
|
||||
.containsEntry("lingniu.ingest.sink.mq.enabled", "${KAFKA_ENABLED:true}")
|
||||
.containsEntry("lingniu.ingest.sink.mq.consumer.enabled", false)
|
||||
.containsEntry("lingniu.ingest.sink.archive.enabled", "${SINK_ARCHIVE_ENABLED:true}")
|
||||
@@ -45,6 +57,9 @@ class Gb32960IngestAppDefaultsTest {
|
||||
assertThat(properties.stringPropertyNames())
|
||||
.noneMatch(name -> name.startsWith("lingniu.ingest.event-file-store."));
|
||||
assertThat(applicationYaml()).doesNotContain("event-file-store:");
|
||||
assertThat(applicationYaml())
|
||||
.contains("password: ${GB32960_PLATFORM_PWD_HYUNDAI:}")
|
||||
.contains("password: ${GB32960_PLATFORM_PWD_YUEJIN:}");
|
||||
}
|
||||
|
||||
private static Properties applicationProperties() {
|
||||
|
||||
@@ -21,6 +21,20 @@ class PortainerComposeResourceLimitsTest {
|
||||
assertServiceMemoryLimit(compose, "vehicle-analytics-app", "VEHICLE_ANALYTICS_MEM_LIMIT", "1024m");
|
||||
}
|
||||
|
||||
@Test
|
||||
void gb32960ComposeExposesBothPlatformAccountsWithoutSecrets() throws IOException {
|
||||
String compose = Files.readString(repositoryRoot().resolve("deploy/portainer/docker-compose.yml"));
|
||||
String gb32960Service = serviceBlock(compose, "gb32960-ingest-app");
|
||||
|
||||
assertThat(gb32960Service)
|
||||
.contains("GB32960_PLATFORM_USER_HYUNDAI: ${GB32960_PLATFORM_USER_HYUNDAI:-Hyundai}")
|
||||
.contains("GB32960_PLATFORM_PWD_HYUNDAI: ${GB32960_PLATFORM_PWD_HYUNDAI:-}")
|
||||
.contains("GB32960_PLATFORM_IP_HYUNDAI: ${GB32960_PLATFORM_IP_HYUNDAI:-}")
|
||||
.contains("GB32960_PLATFORM_USER_YUEJIN: ${GB32960_PLATFORM_USER_YUEJIN:-YueJin}")
|
||||
.contains("GB32960_PLATFORM_PWD_YUEJIN: ${GB32960_PLATFORM_PWD_YUEJIN:-}")
|
||||
.contains("GB32960_PLATFORM_IP_YUEJIN: ${GB32960_PLATFORM_IP_YUEJIN:-}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void vehicleHistoryUsesApplicationConsumerGroupEnvironmentNames() throws IOException {
|
||||
String compose = Files.readString(repositoryRoot().resolve("deploy/portainer/docker-compose.yml"));
|
||||
|
||||
Reference in New Issue
Block a user