biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / servers / nosql / apache-jena / fuseki-test.nix
blobbbf98a838259360e63a9ac1c401b8f6056df2d94
1 { lib, runCommand, apache-jena-fuseki, curl }:
2 runCommand "fuseki-test-${apache-jena-fuseki.name}"
3 { nativeBuildInputs = [ curl apache-jena-fuseki ]; } ''
4   export FUSEKI_BASE="$PWD/fuseki-base"
5   mkdir -p "$FUSEKI_BASE/db"
6   FUSEKI_ARGS="--update --loc=$FUSEKI_BASE/db /dataset" fuseki start
7   fuseki status
8   for i in $(seq 120); do
9       if  curl http://127.0.0.1:3030/dataset/data; then
10           break;
11       fi
12       sleep 1
13   done
14   curl -d 'update=insert+data+{+<test://subject>+<test://predicate>+<test://object>+}' http://127.0.0.1:3030/dataset/update > /dev/null
15   curl http://127.0.0.1:3030/dataset/data | grep -C999 'test://predicate'
16   curl -d 'query=select+?s+?p+?o+where+{+?s+?p+?o+.+}' http://127.0.0.1:3030/dataset/query | grep -C999 'test://predicate'
17   touch $out