backend: support external SPARQL and named-graph snapshots
This commit is contained in:
20
backend_go/sparql_named_graph_test.go
Normal file
20
backend_go/sparql_named_graph_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user