Standardize neon cyan on #00e8f5, wire SacredPageHeader across Builds/Path Tracer/LOTL, dedupe Pages.css, align Path Tracer chrome, drop dead wealth-deck CSS, add prefers-color-scheme shell + HelpTip, sidebar version from package.json build inject, and Vitest CSS regression guards.
51 lines
1.2 KiB
Go
51 lines
1.2 KiB
Go
package api
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestArchitectureDeferredHonestStubs(t *testing.T) {
|
|
t.Run("tunnel_stream WS stub", func(t *testing.T) {
|
|
src, err := os.ReadFile("websocket.go")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
body := string(src)
|
|
if !strings.Contains(body, `case "tunnel_stream":`) || !strings.Contains(body, `"implemented": false`) {
|
|
t.Fatal("expected dashboard tunnel_stream not-implemented stub")
|
|
}
|
|
})
|
|
|
|
t.Run("WS init pagination option", func(t *testing.T) {
|
|
src, err := os.ReadFile("dashboard_ws_init.go")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if !strings.Contains(string(src), "init_limit") {
|
|
t.Fatal("expected init_limit query param parser")
|
|
}
|
|
})
|
|
|
|
t.Run("Path Tracer SQLite persistence", func(t *testing.T) {
|
|
src, err := os.ReadFile("pathtracer_handler.go")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if !strings.Contains(string(src), "loadPersistedSessions") {
|
|
t.Fatal("expected Path Tracer startup restore from SQLite")
|
|
}
|
|
})
|
|
|
|
t.Run("SQLite single-writer ceiling documented", func(t *testing.T) {
|
|
src, err := os.ReadFile("../db/sqlite.go")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if !strings.Contains(string(src), "SetMaxOpenConns(1)") {
|
|
t.Fatal("expected SQLite single-writer guard")
|
|
}
|
|
})
|
|
}
|