Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ While still in the test-app directory run the following gradle command.

cd test-app
./gradlew -i mlDeploy
./gradlew -i -Penv=e2e mlLoadData mlLoadModules

Once the deploy has completed successfully, use "cd .." to return to the root directory of the project.

Expand Down
10 changes: 2 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def runTests() {
./gradlew -i mlWaitTillReady
./gradlew -i mlTestConnections
./gradlew -i mlDeploy
./gradlew -i -Penv=e2e mlLoadData mlLoadModules

cd ..
rm -rf $WORKSPACE/*.xml || true
Expand Down Expand Up @@ -70,19 +71,12 @@ def runLint() {

def runE2ETests() {
sh label: 'run-e2e-tests', script: '''
export JAVA_HOME=$JAVA_HOME_DIR
export GRADLE_USER_HOME=$WORKSPACE/$GRADLE_DIR
export PATH=$JAVA_HOME/bin:${NODE_HOME_DIR}/bin:$PATH
export PATH=${NODE_HOME_DIR}/bin:$PATH
cd node-client-api
node --version
npm --version
npm ci

cd test-complete-app-mlDeploy
echo "Deploying from test-complete-app-mlDeploy"
./gradlew -i mlDeploy
cd ..

echo "Running test-complete tests"
./node_modules/.bin/mocha --no-parallel -R xunit --timeout 60000 test-complete/ --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/test-complete-results.xml || true
echo "Done with test-complete tests"
Expand Down
31 changes: 30 additions & 1 deletion test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}

plugins {
id "net.saliman.properties" version "1.5.2"
id "net.saliman.properties" version "1.6.0"
}

apply plugin: "com.marklogic.ml-gradle"
Expand Down Expand Up @@ -46,3 +46,32 @@ ext {
command.setValidFor(365)
mlAppDeployer.commands.add(command)
}

tasks.register("curlPeople", Exec) {
commandLine = [
'curl',
'--fail',
'--anyauth', '--user', 'admin:admin',
'-i',
'-X', 'POST',
'--data-binary', '@./src/main/turtle/people/people.ttl',
'-H', 'Content-type: text/turtle',
'http://localhost:8079/v1/graphs?graph=/people'
]
}

tasks.register("curlCompanies", Exec) {
commandLine = [
'curl',
'--fail',
'--anyauth', '--user', 'admin:admin',
'-i',
'-X', 'POST',
'--data-binary', '@./src/main/turtle/companies/companies_100.ttl',
'-H', 'Content-type: text/turtle',
'http://localhost:8079/v1/graphs?graph=/optic/sparql/test/companies.ttl'
]
}

mlDeploy.finalizedBy curlPeople
mlDeploy.finalizedBy curlCompanies
8 changes: 8 additions & 0 deletions test-app/gradle-e2e.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Defines properties for loading data and modules for the so-called "e2e" tests in "test-complete".
mlDataPaths=src/main/ml-e2e-data
mlModulePaths=src/main/ml-e2e-modules

mlDataDatabaseName=nodeOpticFunctionalTest
mlModulesDatabaseName=nodeOpticFunctionalTestModules

mlNoRestServer=true
5 changes: 4 additions & 1 deletion test-app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# See https://github.com/stevesaliman/gradle-properties-plugin
propertiesPluginEnvironmentNameProperty=env

mlAppName=unittest-nodeapi
mlContentDatabaseName=unittest-nodeapi
mlHost=localhost
mlUsername=admin
mlPassword=admin
mlRestPort=8015
mlContentForestsPerHost=3
mlContentForestsPerHost=3
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"url-rewriter": "/MarkLogic/rest-api/rewriter.xml",
"rewrite-resolves-globally": true,
"authentication": "digestbasic",
"ssl-certificate-template": "ssl-project-template"
}
"ssl-certificate-template": "node-client-ssl-template"
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SSL certificate template reference has been changed from 'ssl-project-template' to 'node-client-ssl-template', but this new template is not included in the visible configuration files. Ensure this template is defined elsewhere in the project or deployed separately.

Copilot uses AI. Check for mistakes.
}
45 changes: 0 additions & 45 deletions test-complete-app-mlDeploy/build.gradle

This file was deleted.

8 changes: 0 additions & 8 deletions test-complete-app-mlDeploy/gradle.properties

This file was deleted.

Binary file not shown.

This file was deleted.

Loading