Skip to content

Commit

Permalink
marklogic-community#563 Framework tests don't work from the filesystem
Browse files Browse the repository at this point in the history
They don't work because they rely on property substitution in
test-config.xqy to indicate what user the requests should be made as.
  • Loading branch information
dmcassel committed Oct 25, 2016
1 parent 971b334 commit e051bbf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/suites/Framework Tests/suite-setup.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ xquery version "1.0-ml";

import module namespace test="http://marklogic.com/roxy/test-helper" at "/test/test-helper.xqy";

(: These tests require the modules database, because they will make HTTP
: requests using credentials from test-config.xqy. Those credentials will only
: be available if property substitution happens, which only works when using a
: modules database.
:)
if (xdmp:modules-database() eq 0) then
test:fail("You must run this test from a modules database.")
else (),

(: create a test controller and views :)
test:load-test-file("tester.xqy", xdmp:modules-database(), fn:concat(xdmp:modules-root(), "app/controllers/tester.xqy")),
test:load-test-file("tester.sjs", xdmp:modules-database(), fn:concat(xdmp:modules-root(), "app/controllers/tester.sjs")),
Expand Down

0 comments on commit e051bbf

Please sign in to comment.