Skip to content

Commit da6d7e1

Browse files
add separate setup npm command
1 parent 7abbbcc commit da6d7e1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/encryption-tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ jobs:
3333
run: npm install
3434
- name: Install mongodb-client-encryption
3535
run: npm install mongodb-client-encryption
36+
- name: Setup Tests
37+
run: npm run setup-test-encryption
3638
- name: Run Tests
3739
run: npm run test-encryption

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ If you have a question about Mongoose (not a bug report) please post it to eithe
4646
* execute `npm run test-tsd` to run the typescript tests
4747
* execute `npm run ts-benchmark` to run the typescript benchmark "performance test" for a single time.
4848
* execute `npm run ts-benchmark-watch` to run the typescript benchmark "performance test" while watching changes on types folder. Note: Make sure to commit all changes before executing this command.
49-
* in order to run tests that require an cluster with encryption locally, run `npm run test-encryption`/ Alternatively, you can start an encrypted cluster using the `scripts/configure-cluster-with-encryption.sh` file.
49+
* in order to run tests that require an cluster with encryption locally, run `npm run setup-test-encryption` followed by `npm run test-encryption`. Alternatively, you can start an encrypted cluster using the `scripts/configure-cluster-with-encryption.sh` file.
5050
* These scripts can take a few minutes to run.
5151
* To change an encryption configuration, it is recommended to follow these steps:
5252
* Edit the variables in `scripts/configure-cluster-with-encryption.sh` with your desired configuration.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"bson": "^6.7.0",
2323
"kareem": "2.6.3",
2424
"mongodb": "~6.10.0",
25+
"mongodb-client-encryption": "^6.1.1",
2526
"mpath": "0.9.0",
2627
"mquery": "5.0.0",
2728
"ms": "2.1.3",
@@ -104,7 +105,8 @@
104105
"test-deno": "deno run --allow-env --allow-read --allow-net --allow-run --allow-sys --allow-write ./test/deno.js",
105106
"test-rs": "START_REPLICA_SET=1 mocha --timeout 30000 --exit ./test/*.test.js",
106107
"test-tsd": "node ./test/types/check-types-filename && tsd",
107-
"test-encryption": "bash scripts/configure-cluster-with-encryption.sh && mocha --exit ./test/encryption/*.test.js && npm uninstall mongodb-client-encryption > /dev/null",
108+
"setup-test-encryption": "bash scripts/configure-cluster-with-encryption.sh",
109+
"test-encryption": "mocha --exit ./test/encryption/*.test.js",
108110
"tdd": "mocha ./test/*.test.js --inspect --watch --recursive --watch-files ./**/*.{js,ts}",
109111
"test-coverage": "nyc --reporter=html --reporter=text npm test",
110112
"ts-benchmark": "cd ./benchmarks/typescript/simple && npm install && npm run benchmark | node ../../../scripts/tsc-diagnostics-check"

0 commit comments

Comments
 (0)