backend: support external SPARQL and named-graph snapshots

This commit is contained in:
Oxy8
2026-04-06 13:36:08 -03:00
parent 696844f341
commit 44c1d3eaa6
25 changed files with 1695 additions and 243 deletions

View File

@@ -0,0 +1,20 @@
package main
import (
"strings"
"testing"
)
func TestNamedGraphAnyTripleAskQueryUsesGraphVariable(t *testing.T) {
query := namedGraphAnyTripleAskQuery()
if !strings.Contains(query, "ASK WHERE") {
t.Fatalf("readiness query should be an ASK query:\n%s", query)
}
if !strings.Contains(query, "GRAPH ?g") {
t.Fatalf("readiness query should probe named graphs:\n%s", query)
}
if strings.Contains(query, "ASK WHERE { ?s ?p ?o }") {
t.Fatalf("readiness query should no longer probe only the default graph:\n%s", query)
}
}