Running XQSuite Tests as a Main Module
xquery version "3.1";
import module namespace test="http://exist-db.org/xquery/xqsuite" at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql";
declare namespace inspect = "http://exist-db.org/xquery/inspection";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:indent "yes";
declare variable $local:XML := document {
<doc><div n="outer"><head>x</head><div n="inner"><head>x</head><p>y</p></div></div></doc>
};
declare variable $local:COLL := "/db/test-nested-predicate";
declare %test:setUp function local:setup() {
xmldb:create-collection("/db", "test-nested-predicate"),
xmldb:store($local:COLL, "test.xml", $local:XML)
};
declare %test:tearDown function local:tearDown() {
if (xmldb:collection-available($local:COLL)) then xmldb:remove($local:COLL) else ()
};
declare %test:assertEquals("outer", "inner") function local:in-memory() {
$local:XML//div[.//p[. = "y"]] ! string(@n)
};
declare %test:assertEquals("outer", "inner") function local:stored() {
doc($local:COLL || "/test.xml")//div[.//p[. = "y"]] ! string(@n)
};
test:suite(inspect:module-functions())
TrueForge OUTBOUND_URL_ALLOWED_HOSTS
I started tinkering with TrueForge, an open source "Agent Harness". Immediately, I ran into problems connecting to a Ollama service I had running in Docker on a NAS box on my LAN. I kept getting "Outbound URL blocked for host nasbox" when I tried adding a custom provider. It took me a long time to find the OUTBOUND_URL_ALLOWED_HOSTS environment variable before running TrueForge via npx. I hope it helps somebody...
$env:OUTBOUND_URL_ALLOWED_HOSTS='["localhost","127.0.0.1","nasbox","192.168.1.27"]'
npx @truefoundry/trueforge@latest












