docs: simplify jt808 mileage runtime state
This commit is contained in:
@@ -35,6 +35,31 @@ class VehicleStatRepositoryContractTest {
|
||||
.doesNotContain("speed integral");
|
||||
}
|
||||
|
||||
@Test
|
||||
void targetArchitectureDocumentsMetricTableAsOnlyJt808MileageRuntimeState() throws IOException {
|
||||
String architecture = Files.readString(repositoryRoot().resolve("docs/target-architecture.md"));
|
||||
|
||||
assertThat(architecture)
|
||||
.contains("Runtime state: none outside `vehicle_stat_metric`")
|
||||
.contains("Restart recovery reads the same metric row")
|
||||
.contains("JT808 daily mileage is stored only in `vehicle_stat_metric`")
|
||||
.doesNotContain("state-store")
|
||||
.doesNotContain("Redis mileage state")
|
||||
.doesNotContain("production memory");
|
||||
}
|
||||
|
||||
@Test
|
||||
void jt808MileageRunbookDocumentsMetricTableAsOnlyRuntimeState() throws IOException {
|
||||
String runbook = Files.readString(repositoryRoot()
|
||||
.resolve("docs/operations/jt808-daily-mileage-runbook.md"));
|
||||
|
||||
assertThat(runbook)
|
||||
.contains("Runtime state: none outside `vehicle_stat_metric`")
|
||||
.contains("Restart recovery reads the same `daily_mileage_km` metric row")
|
||||
.doesNotContain("Redis mileage state")
|
||||
.doesNotContain("state-store");
|
||||
}
|
||||
|
||||
private static Path repositoryRoot() {
|
||||
Path path = Path.of("").toAbsolutePath();
|
||||
while (path != null && !Files.exists(path.resolve("docs/superpowers/plans"))) {
|
||||
|
||||
Reference in New Issue
Block a user