feat: expand vehicle data platform capabilities
This commit is contained in:
@@ -225,6 +225,26 @@ func TestDailyMileageSourceSchemaIncludesQueryIndexes(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDailyMileageSchemaIncludesPureHydrogenEvidence(t *testing.T) {
|
||||
for _, want := range []string{
|
||||
"pure_hydrogen_mileage_km DECIMAL(18,3) NOT NULL DEFAULT 0",
|
||||
} {
|
||||
if !strings.Contains(DailyMileageTableSQL, want) {
|
||||
t.Fatalf("daily mileage schema missing %q:\n%s", want, DailyMileageTableSQL)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{
|
||||
"pure_hydrogen_mileage_km DECIMAL(18,3) NOT NULL DEFAULT 0",
|
||||
"pure_hydrogen_sample_count BIGINT NOT NULL DEFAULT 0",
|
||||
"latest_pure_hydrogen_active TINYINT(1) NOT NULL DEFAULT 0",
|
||||
"latest_pure_hydrogen_mode_known TINYINT(1) NOT NULL DEFAULT 0",
|
||||
} {
|
||||
if !strings.Contains(DailyMileageSourceTableSQL, want) {
|
||||
t.Fatalf("daily mileage source schema missing %q:\n%s", want, DailyMileageSourceTableSQL)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func containsStatement(statements []string, fragment string) bool {
|
||||
for _, statement := range statements {
|
||||
if strings.Contains(statement, fragment) {
|
||||
|
||||
Reference in New Issue
Block a user