Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 980848b

Browse files
committed
#129 fix creation of triggers database; first pass tests
1 parent 65b5445 commit 980848b

File tree

16 files changed

+198
-120
lines changed

16 files changed

+198
-120
lines changed

gradle/build.gradle

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
1+
// copied
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
}
7+
dependencies {
8+
classpath "com.marklogic:ml-unit-test-client:${mlUnitTestVersion}"
9+
classpath "com.marklogic:ml-gradle:${mlGradleVersion}"
10+
}
11+
}
12+
113
plugins {
214
id "net.saliman.properties" version "1.4.6"
3-
id "com.marklogic.ml-gradle" version "3.8.1"
15+
// id "com.marklogic.ml-gradle" version "3.8.1"
16+
}
17+
18+
apply plugin: "java"
19+
apply plugin: "com.marklogic.ml-gradle"
20+
21+
repositories {
22+
jcenter()
23+
}
24+
25+
dependencies {
26+
mlRestApi "com.marklogic:ml-unit-test-modules:${mlUnitTestVersion}"
27+
28+
// For running ml-unit-test tests via JUnit
29+
testCompile "com.marklogic:ml-unit-test-client:${mlUnitTestVersion}"
30+
testCompile "junit:junit:4.12"
431
}
32+

gradle/gradle.properties

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
1+
# copied from ml-unit-test
2+
mlGradleVersion=3.7.1
3+
mlUnitTestVersion=0.11.1
4+
15
# Roxy properties that were mapped to ml-gradle properties
26
mlAppName=workflow
37
mlRestPort=8040
4-
mlRestAdminPassword=5cPeht38`|NU32OX_?+H
8+
mlRestAdminPassword=admin
59
mlRestAuthentication=digest
6-
mlContentDatabaseName=${app-name}-content
10+
mlContentDatabaseName=workflow-content
711
mlContentForestsPerHost=1
812
mlGroupName=Default
9-
mlModulesDatabaseName=${app-name}-modules
13+
mlModulesDatabaseName=workflow-modules
1014
mlPassword=admin
1115
mlTestRestPort=8042
1216
mlUsername=admin
17+
mlTriggersDatabaseName=workflow-triggers
18+
mlReplaceTokensInModules=true
1319

14-
# Added automatically by ml-gradle under the assumption that a Roxy application defines all of the app servers that it needs
20+
# Added automatically by ml-gradle under the assumption that a Roxy application defines all of the app servers that it needs
1521
# and thus doesn't need ml-gradle to automatically create a REST API server for it.
1622
mlNoRestServer=true
1723

1824
# All other Roxy properties
19-
xquery.dir=${basedir}/src
25+
xquery.dir=${workflow-test}/src
2026
controller-ext=xqy
21-
mlGroupName=Default
2227
app-type=rest
2328
rest-options.dir=${basedir}/rest-api/config
2429
data.dir=${basedir}/data
2530
config.file=${basedir}/deploy/ml-config.xml
2631
triggers.file=${basedir}/deploy/triggers-config.xml
2732
schemas.dir=${basedir}/schemas
2833
schemas.root=/
29-
mlUsername=admin
30-
mlPassword=admin
31-
mlAppName=workflow
3234
modules-root=/
3335
modules-prefix=/
34-
app-role=${app-name}-role
35-
mlContentDatabaseName=${app-name}-content
36-
mlModulesDatabaseName=${app-name}-modules
36+
app-role=workflow-role
3737
app-modules-db=${modules-db}
38-
mlContentForestsPerHost=1
3938
do-not-deploy-tests=prod
4039
xquery-test.dir=${basedir}/src/test
4140
bootstrap-port-five=8002
@@ -44,13 +43,11 @@ qconsole-port=8000
4443
load-html-as-xml=false
4544
load-js-as-binary=false
4645
load-css-as-binary=true
47-
mlRestPort=8040
4846
xcc-port=8041
4947
install-xcc=true
5048
use-https=false
5149
use-https-for-rest=false
52-
mlRestAuthentication=digest
53-
default-user=${app-name}-user
50+
default-user=workflow-user
5451
xdbc-authentication-method=digest
5552
url-rewriter=/MarkLogic/rest-api/rewriter.xml
5653
error-handler=/MarkLogic/rest-api/error-handler.xqy
@@ -72,12 +69,15 @@ application-conf-file=src/app/config/config.xqy
7269
verify_retry_max=5
7370
verify_retry_interval=10
7471
pipeline-config-file=${basedir}/deploy/pipeline-config.xml
75-
test-content-db=${app-name}-content-test
76-
test-modules-db=${app-name}-modules
77-
mlTestRestPort=8042
78-
triggers-db=${app-name}-triggers
79-
mlRestAdminPassword=5cPeht38`|NU32OX_?+H
72+
test-content-db=workflow-content-test
73+
test-modules-db=workflow-modules
8074
rest-ext.dir=${basedir}/rest-api/ext
8175
rest-transforms.dir=${basedir}/rest-api/transforms
8276
rewrite-resolves-globally=true
8377
save-commit-info=false
78+
79+
80+
# Test modules could be kept under src/main/ml-modules, but it's recommend to keep them in a separate directory so that
81+
# the directory can be easily excluded by overriding this property
82+
mlConfigPaths=src/main/ml-config,src/test/ml-config
83+
mlModulePaths=src/main/ml-modules,src/test/ml-modules

gradle/src/main/ml-config/databases/workflow-content.json renamed to gradle/src/main/ml-config/databases/content-database.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"assignment-policy" : {
100100
"assignment-policy-name" : "bucket"
101101
}
102-
}
102+
}

gradle/src/main/ml-config/databases/workflow-modules.json renamed to gradle/src/main/ml-config/databases/modules-database.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@
7979
"assignment-policy" : {
8080
"assignment-policy-name" : "bucket"
8181
}
82-
}
82+
}

gradle/src/main/ml-config/databases/workflow-triggers.json renamed to gradle/src/main/ml-config/databases/triggers-database.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@
7979
"assignment-policy" : {
8080
"assignment-policy-name" : "bucket"
8181
}
82-
}
82+
}

gradle/src/main/ml-config/forests/workflow-content-test/workflow-content-test-001-1.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

gradle/src/main/ml-config/forests/workflow-content/workflow-content-001-1.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

gradle/src/main/ml-config/forests/workflow-modules/workflow-modules.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

gradle/src/main/ml-config/forests/workflow-triggers/workflow-triggers.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

gradle/src/main/ml-config/servers/workflow.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"server-name" : "workflow",
3-
"group-name" : "Default",
2+
"server-name" : "%%NAME%%",
3+
"group-name" : "%%GROUP%%",
44
"server-type" : "http",
55
"enabled" : true,
66
"root" : "/",
7-
"port" : 8040,
7+
"port" : "%%PORT%%",
88
"webDAV" : false,
99
"execute" : true,
1010
"display-last-login" : false,
@@ -70,4 +70,4 @@
7070
"content-database" : "workflow-content",
7171
"modules-database" : "workflow-modules",
7272
"default-user" : "workflow-user"
73-
}
73+
}

0 commit comments

Comments
 (0)