Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts. Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation. Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
39 lines
1007 B
Go
39 lines
1007 B
Go
package mestionora
|
|
|
|
import (
|
|
"database/sql"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestCityContentExistenceUsesPathIndex(t *testing.T) {
|
|
database := newSearchTestDB(t)
|
|
for _, kind := range []string{"quartier", "street", "spot"} {
|
|
rows, err := database.Query("EXPLAIN QUERY PLAN "+citySearchSQL(kind, ""), sql.Named("domain", "d"), sql.Named("scope", "/"), sql.Named("prefix", "/"), sql.Named("upper", "0"), sql.Named("query", "needle"), sql.Named("limit", 1000))
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
indexed := false
|
|
for rows.Next() {
|
|
var id, parent, unused int
|
|
var detail string
|
|
if err := rows.Scan(&id, &parent, &unused, &detail); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if strings.Contains(detail, "SEARCH cp USING") {
|
|
indexed = true
|
|
}
|
|
if strings.Contains(detail, "SCAN cp") {
|
|
t.Fatalf("unbounded Path lookup: %s", detail)
|
|
}
|
|
}
|
|
if err := rows.Err(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
rows.Close()
|
|
if !indexed {
|
|
t.Fatalf("no indexed portal lookup for %s", kind)
|
|
}
|
|
}
|
|
}
|