Skip to content

Commit 278523a

Browse files
ci(NODE-5667): remove custom dep tests against master and fix prose test 14 (#3883)
1 parent 85996c3 commit 278523a

File tree

6 files changed

+40
-93
lines changed

6 files changed

+40
-93
lines changed

.evergreen/config.yml

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,23 +2508,7 @@ tasks:
25082508
- func: bootstrap kms servers
25092509
- func: run custom csfle tests
25102510
vars:
2511-
CSFLE_GIT_REF: c56c70340093070b1ef5c8a28190187eea21a6e9
2512-
- name: run-custom-csfle-tests-5.0-master
2513-
tags:
2514-
- run-custom-dependency-tests
2515-
commands:
2516-
- func: install dependencies
2517-
vars:
2518-
NODE_LTS_VERSION: 12
2519-
NPM_VERSION: 8
2520-
- func: bootstrap mongo-orchestration
2521-
vars:
2522-
VERSION: '5.0'
2523-
TOPOLOGY: replica_set
2524-
- func: bootstrap kms servers
2525-
- func: run custom csfle tests
2526-
vars:
2527-
CSFLE_GIT_REF: master
2511+
CSFLE_GIT_REF: 5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0
25282512
- name: run-custom-csfle-tests-rapid-pinned-commit
25292513
tags:
25302514
- run-custom-dependency-tests
@@ -2540,23 +2524,7 @@ tasks:
25402524
- func: bootstrap kms servers
25412525
- func: run custom csfle tests
25422526
vars:
2543-
CSFLE_GIT_REF: c56c70340093070b1ef5c8a28190187eea21a6e9
2544-
- name: run-custom-csfle-tests-rapid-master
2545-
tags:
2546-
- run-custom-dependency-tests
2547-
commands:
2548-
- func: install dependencies
2549-
vars:
2550-
NODE_LTS_VERSION: 12
2551-
NPM_VERSION: 8
2552-
- func: bootstrap mongo-orchestration
2553-
vars:
2554-
VERSION: rapid
2555-
TOPOLOGY: replica_set
2556-
- func: bootstrap kms servers
2557-
- func: run custom csfle tests
2558-
vars:
2559-
CSFLE_GIT_REF: master
2527+
CSFLE_GIT_REF: 5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0
25602528
- name: run-custom-csfle-tests-latest-pinned-commit
25612529
tags:
25622530
- run-custom-dependency-tests
@@ -2572,23 +2540,7 @@ tasks:
25722540
- func: bootstrap kms servers
25732541
- func: run custom csfle tests
25742542
vars:
2575-
CSFLE_GIT_REF: c56c70340093070b1ef5c8a28190187eea21a6e9
2576-
- name: run-custom-csfle-tests-latest-master
2577-
tags:
2578-
- run-custom-dependency-tests
2579-
commands:
2580-
- func: install dependencies
2581-
vars:
2582-
NODE_LTS_VERSION: 12
2583-
NPM_VERSION: 8
2584-
- func: bootstrap mongo-orchestration
2585-
vars:
2586-
VERSION: latest
2587-
TOPOLOGY: replica_set
2588-
- func: bootstrap kms servers
2589-
- func: run custom csfle tests
2590-
vars:
2591-
CSFLE_GIT_REF: master
2543+
CSFLE_GIT_REF: 5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0
25922544
- name: test-latest-server-noauth
25932545
tags:
25942546
- latest
@@ -3740,11 +3692,8 @@ buildvariants:
37403692
- run-bson-ext-integration
37413693
- run-bson-ext-unit
37423694
- run-custom-csfle-tests-5.0-pinned-commit
3743-
- run-custom-csfle-tests-5.0-master
37443695
- run-custom-csfle-tests-rapid-pinned-commit
3745-
- run-custom-csfle-tests-rapid-master
37463696
- run-custom-csfle-tests-latest-pinned-commit
3747-
- run-custom-csfle-tests-latest-master
37483697
- name: rhel8-test-serverless
37493698
display_name: Serverless Test
37503699
run_on: rhel80-large

.evergreen/generate_evergreen_tasks.js

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,8 @@ for (const {
435435

436436
BUILD_VARIANTS.push({
437437
name: MACOS_OS,
438-
display_name: `MacOS 11 Node${
439-
versions.find(version => version.versionNumber === LATEST_LTS).versionNumber
440-
}`,
438+
display_name: `MacOS 11 Node${versions.find(version => version.versionNumber === LATEST_LTS).versionNumber
439+
}`,
441440
run_on: MACOS_OS,
442441
expansions: {
443442
NODE_LTS_VERSION: LATEST_LTS,
@@ -625,38 +624,34 @@ const oneOffFuncAsTasks = oneOffFuncs.map(oneOffFunc => ({
625624
]
626625
}));
627626

628-
const FLE_PINNED_COMMIT = 'c56c70340093070b1ef5c8a28190187eea21a6e9';
629-
630627
for (const version of ['5.0', 'rapid', 'latest']) {
631-
for (const ref of [FLE_PINNED_COMMIT, 'master']) {
632-
oneOffFuncAsTasks.push({
633-
name: `run-custom-csfle-tests-${version}-${ref === 'master' ? ref : 'pinned-commit'}`,
634-
tags: ['run-custom-dependency-tests'],
635-
commands: [
636-
{
637-
func: 'install dependencies',
638-
vars: {
639-
NODE_LTS_VERSION: LOWEST_LTS,
640-
NPM_VERSION: 8
641-
}
642-
},
643-
{
644-
func: 'bootstrap mongo-orchestration',
645-
vars: {
646-
VERSION: version,
647-
TOPOLOGY: 'replica_set'
648-
}
649-
},
650-
{ func: 'bootstrap kms servers' },
651-
{
652-
func: 'run custom csfle tests',
653-
vars: {
654-
CSFLE_GIT_REF: ref
655-
}
628+
oneOffFuncAsTasks.push({
629+
name: `run-custom-csfle-tests-${version}-pinned-commit`,
630+
tags: ['run-custom-dependency-tests'],
631+
commands: [
632+
{
633+
func: 'install dependencies',
634+
vars: {
635+
NODE_LTS_VERSION: LOWEST_LTS,
636+
NPM_VERSION: 8
656637
}
657-
]
658-
});
659-
}
638+
},
639+
{
640+
func: 'bootstrap mongo-orchestration',
641+
vars: {
642+
VERSION: version,
643+
TOPOLOGY: 'replica_set'
644+
}
645+
},
646+
{ func: 'bootstrap kms servers' },
647+
{
648+
func: 'run custom csfle tests',
649+
vars: {
650+
CSFLE_GIT_REF: '5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0'
651+
}
652+
}
653+
]
654+
});
660655
}
661656

662657
const coverageTask = {

.evergreen/run-bson-ext-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
# run tests
2424
echo "Running $AUTH tests over $SSL, connecting to $MONGODB_URI"
2525

26-
npm install mongodb-client-encryption@">=2.3.0"
26+
npm install "mongodb-client-encryption@2.x"
2727
npm install bson-ext
2828

2929
export MONGODB_API_VERSION=${MONGODB_API_VERSION}

.evergreen/run-serverless-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ -z ${MONGODB_URI+omitted} ]; then echo "MONGODB_URI is unset" && exit 1; fi
1010
if [ -z ${SERVERLESS_ATLAS_USER+omitted} ]; then echo "SERVERLESS_ATLAS_USER is unset" && exit 1; fi
1111
if [ -z ${SERVERLESS_ATLAS_PASSWORD+omitted} ]; then echo "SERVERLESS_ATLAS_PASSWORD is unset" && exit 1; fi
1212

13-
npm install mongodb-client-encryption
13+
npm install "mongodb-client-encryption@2.x"
1414

1515
npx mocha \
1616
--config test/mocha_mongodb.json \

.evergreen/run-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ else
5050
echo "adding temporary AWS credentials to environment"
5151
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
5252
source "$DRIVERS_TOOLS"/.evergreen/csfle/set-temp-creds.sh
53+
54+
npm install "[email protected]"
5355
fi
5456

55-
npm install mongodb-client-encryption
5657
npm install @mongodb-js/zstd
5758
npm install snappy
5859

test/integration/client-side-encryption/client_side_encryption.prose.test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,10 +1893,12 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
18931893
keyId: keyId,
18941894
algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'
18951895
});
1896-
// Copy ``ciphertext`` into a variable named ``malformedCiphertext``.
1897-
// Change the last byte to 0. This will produce an invalid HMAC tag.
1896+
// Copy ``ciphertext`` into a variable named ``malformedCiphertext``. Change the
1897+
// last byte to a different value. This will produce an invalid HMAC tag.
18981898
const buffer = Buffer.from(cipherText.buffer);
1899-
buffer.writeInt8(0, buffer.length - 1);
1899+
const lastByte = buffer.readUInt8(buffer.length - 1);
1900+
const replacementByte = lastByte === 0 ? 1 : 0;
1901+
buffer.writeUInt8(replacementByte, buffer.length - 1);
19001902
malformedCiphertext = new Binary(buffer, 6);
19011903
// Create a MongoClient named ``encryptedClient`` with these ``AutoEncryptionOpts``:
19021904
// AutoEncryptionOpts {

0 commit comments

Comments
 (0)