-
Notifications
You must be signed in to change notification settings - Fork 66
Configuring Roxy for Unit Testing in ML8 #563
Comments
rewrite.xqy is broken in Roxy in MarkLogic 8.0-2 and up. Depending on which version you're running, there are some workarounds in this thread: #416 |
Thank you for sharing it however it seems there are security privileges for I noticed that the default user should have xdmp:eval, eval-in and uri Please suggest if I am missing something. Regards,
|
There are several missing privileges that prevent the app-user from being able to run the built-in unit tests. I'm exploring the best way to fix that. |
…they are required for Roxy's rewriter
Took me a while to get to this, but I just submitted a PR. Reviews welcome. |
The amps approach doesn't work, because we support using the filesystem for modules. Amps may not be applied to filesystem code unless it's under the MarkLogic install directory. New approach: the testing role gets the general app role, plus several privileges needed for running tests.
They don't work because they rely on property substitution in test-config.xqy to indicate what user the requests should be made as.
fixed in dev |
Hi,
I was testing Unit Tests feature of the Roxy for my project however no success.I am using roxy as MVC not hybrid. I am testing it in ML8.
When I invoked url http://localhost:8042/test, started seeing below error.
error in /roxy/rewrite.xqy line number 40, conf:rewrite() function not found.
else
try
{
xdmp:eval('
import module namespace conf = "http://marklogic.com/rest-api/endpoints/config"
at "/MarkLogic/rest-api/endpoints/config.xqy";
declare variable $method external;
declare variable $uri external;
declare variable $path external;
(conf:rewrite($method, $uri, $path), $uri)[1]',
(xs:QName("method"), $method,
xs:QName("uri"), $uri,
xs:QName("path"), $path))
}
catch($ex) {
if ($ex/error:code = "XDMP-MODNOTFOUND") then
$uri
else
xdmp:rethrow()
}
Also some of the default UTs are not running due to URI security privileges.
Please let me know if I am missing for providing appropriate privileges to the default user.
Regards,
Indy
The text was updated successfully, but these errors were encountered: