Skip to content

Commit f860f24

Browse files
author
Zhen
committed
Make runTests script to accept args for neorun
To run tests against 3.0 nightly: `runTests.sh` To run tests against 3.1 nightly: `runTests.sh '-n 3.1 -p neo4j'` The first arg after runTests is the arg that will be passed to neorun. JS driver runs tests with auth enabled, so we need to provide `-p neo4j` for changing the default password.
1 parent 55ef331 commit f860f24

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

runTests.ps1

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
npm install
2-
npm run start-neo4j
1+
param(
2+
[string]$input
3+
)
4+
5+
npm installs
6+
7+
If ($input)
8+
{
9+
npm run start-neo4j -- --neorun.start.args=\'"$input"\'
10+
}
11+
else
12+
{
13+
npm run start-neo4j
14+
}
315
npm test
416

517
if(-Not ($?)) #failed to execute npm test
@@ -12,4 +24,4 @@ npm run stop-neo4j
1224
if($ErrorFound -eq $True)
1325
{
1426
exit 1
15-
}
27+
}

runTests.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ function finish {
66
trap finish EXIT
77

88
npm install
9-
npm run start-neo4j
10-
#npm run start-neo4j -- --neorun.start.args='-v 3.0.1 -p neo4j'
9+
10+
if [ "$1" == "" ]; then
11+
npm run start-neo4j
12+
else
13+
# Example: ./runTests.sh '-v 3.0.1 -p neo4j'
14+
npm run start-neo4j -- --neorun.start.args=\'"$1"\'
15+
fi
16+
1117
sleep 2
1218
npm test

0 commit comments

Comments
 (0)