deploy: persist ingest archive paths

This commit is contained in:
lingniu
2026-07-01 11:59:11 +08:00
parent 5ec3be97aa
commit 5ede13e6d4
2 changed files with 25 additions and 0 deletions

View File

@@ -91,6 +91,25 @@ class PortainerComposeResourceLimitsTest {
.doesNotContain("vehicle-history-archive:");
}
@Test
void portainerIngestAppsWriteColdArchiveToMountedDataVolume() throws IOException {
String compose = Files.readString(repositoryRoot().resolve("deploy/portainer/docker-compose.yml"));
String gb32960Service = serviceBlock(compose, "gb32960-ingest-app");
String jt808Service = serviceBlock(compose, "jt808-ingest-app");
String mqttService = serviceBlock(compose, "yutong-mqtt-app");
assertThat(gb32960Service)
.contains("SINK_ARCHIVE_PATH: ${GB32960_ARCHIVE_PATH:-/data/archive}")
.contains("- gb32960-ingest-data:/data");
assertThat(jt808Service)
.contains("SINK_ARCHIVE_PATH: ${JT808_ARCHIVE_PATH:-/data/archive}")
.contains("- jt808-ingest-data:/data");
assertThat(mqttService)
.contains("SINK_ARCHIVE_PATH: ${YUTONG_MQTT_ARCHIVE_PATH:-/data/archive}")
.contains("- yutong-mqtt-data:/data");
assertThat(compose).contains("\n yutong-mqtt-data:\n");
}
@Test
void localLaunchctlHistoryRuntimeDoesNotRequireSharedArchiveRoot() throws IOException {
Path launchctl = repositoryRoot().resolve("deploy/local/launchctl");