Closed eouthwaite closed 6 years ago
Test script 114.xqy.txt
Fixed -
Use below to check ...
xquery version "1.0-ml"; (: 01-processmodel-create :) import module namespace c="http://marklogic.com/roxy/workflow-constants" at "/test/workflow-constants.xqy"; import module namespace test="http://marklogic.com/roxy/test-helper" at "/test/test-helper.xqy"; import module namespace wrt="http://marklogic.com/workflow/rest-tests" at "/test/workflow-rest-tests.xqy"; declare namespace ext = "http://marklogic.com/rest-api/resource/processmodel"; declare namespace http = "xdmp:http"; (: let $process := wrt:processmodel-create ($c:xml-options, "015-restapi-tests.bpmn") :) let $options := $c:xml-options let $filename := "015-restapi-tests.bpmn"
let $uri := fn:concat(
"http://", $c:RESTHOST, ':', $c:RESTPORT,
"/v1/resources/processmodel?rs:name=", $filename,
"&rs:enable=true")
let $fullpath := fn:concat("/raw/data/", $filename) let $file := fn:doc($fullpath) return ($uri, $options, xdmp:http-put ($uri, $options, $file) )
returns
Note: dependent on #111
Test 01-processmodel-create in /src/test/suites/e2e-rest-process-xml/015-processmodel-xml.xqy is currently set to return JSON as attempting to return XML ($c:xml-options) results in:
[1.0-ml] XDMP-JSONDOC: xdmp:http-put("http://localhost:8042/v1/resources/processmodel?rs:name=015-rest...", <options xmlns="xdmp:http"><authentication method="digest"><username>...</username>...</authentication>...</options>, fn:doc("/raw/data/015-restapi-tests.bpmn")) -- Document is not JSON