Skip to content

Commit

Permalink
ci(NODE-5667): remove custom dep tests against master and fix prose t…
Browse files Browse the repository at this point in the history
…est 14 (#3883)
  • Loading branch information
baileympearson committed Oct 9, 2023
1 parent 85996c3 commit 278523a
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 93 deletions.
57 changes: 3 additions & 54 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2508,23 +2508,7 @@ tasks:
- func: bootstrap kms servers
- func: run custom csfle tests
vars:
CSFLE_GIT_REF: c56c70340093070b1ef5c8a28190187eea21a6e9
- name: run-custom-csfle-tests-5.0-master
tags:
- run-custom-dependency-tests
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 12
NPM_VERSION: 8
- func: bootstrap mongo-orchestration
vars:
VERSION: '5.0'
TOPOLOGY: replica_set
- func: bootstrap kms servers
- func: run custom csfle tests
vars:
CSFLE_GIT_REF: master
CSFLE_GIT_REF: 5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0
- name: run-custom-csfle-tests-rapid-pinned-commit
tags:
- run-custom-dependency-tests
Expand All @@ -2540,23 +2524,7 @@ tasks:
- func: bootstrap kms servers
- func: run custom csfle tests
vars:
CSFLE_GIT_REF: c56c70340093070b1ef5c8a28190187eea21a6e9
- name: run-custom-csfle-tests-rapid-master
tags:
- run-custom-dependency-tests
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 12
NPM_VERSION: 8
- func: bootstrap mongo-orchestration
vars:
VERSION: rapid
TOPOLOGY: replica_set
- func: bootstrap kms servers
- func: run custom csfle tests
vars:
CSFLE_GIT_REF: master
CSFLE_GIT_REF: 5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0
- name: run-custom-csfle-tests-latest-pinned-commit
tags:
- run-custom-dependency-tests
Expand All @@ -2572,23 +2540,7 @@ tasks:
- func: bootstrap kms servers
- func: run custom csfle tests
vars:
CSFLE_GIT_REF: c56c70340093070b1ef5c8a28190187eea21a6e9
- name: run-custom-csfle-tests-latest-master
tags:
- run-custom-dependency-tests
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 12
NPM_VERSION: 8
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
TOPOLOGY: replica_set
- func: bootstrap kms servers
- func: run custom csfle tests
vars:
CSFLE_GIT_REF: master
CSFLE_GIT_REF: 5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0
- name: test-latest-server-noauth
tags:
- latest
Expand Down Expand Up @@ -3740,11 +3692,8 @@ buildvariants:
- run-bson-ext-integration
- run-bson-ext-unit
- run-custom-csfle-tests-5.0-pinned-commit
- run-custom-csfle-tests-5.0-master
- run-custom-csfle-tests-rapid-pinned-commit
- run-custom-csfle-tests-rapid-master
- run-custom-csfle-tests-latest-pinned-commit
- run-custom-csfle-tests-latest-master
- name: rhel8-test-serverless
display_name: Serverless Test
run_on: rhel80-large
Expand Down
61 changes: 28 additions & 33 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,8 @@ for (const {

BUILD_VARIANTS.push({
name: MACOS_OS,
display_name: `MacOS 11 Node${
versions.find(version => version.versionNumber === LATEST_LTS).versionNumber
}`,
display_name: `MacOS 11 Node${versions.find(version => version.versionNumber === LATEST_LTS).versionNumber
}`,
run_on: MACOS_OS,
expansions: {
NODE_LTS_VERSION: LATEST_LTS,
Expand Down Expand Up @@ -625,38 +624,34 @@ const oneOffFuncAsTasks = oneOffFuncs.map(oneOffFunc => ({
]
}));

const FLE_PINNED_COMMIT = 'c56c70340093070b1ef5c8a28190187eea21a6e9';

for (const version of ['5.0', 'rapid', 'latest']) {
for (const ref of [FLE_PINNED_COMMIT, 'master']) {
oneOffFuncAsTasks.push({
name: `run-custom-csfle-tests-${version}-${ref === 'master' ? ref : 'pinned-commit'}`,
tags: ['run-custom-dependency-tests'],
commands: [
{
func: 'install dependencies',
vars: {
NODE_LTS_VERSION: LOWEST_LTS,
NPM_VERSION: 8
}
},
{
func: 'bootstrap mongo-orchestration',
vars: {
VERSION: version,
TOPOLOGY: 'replica_set'
}
},
{ func: 'bootstrap kms servers' },
{
func: 'run custom csfle tests',
vars: {
CSFLE_GIT_REF: ref
}
oneOffFuncAsTasks.push({
name: `run-custom-csfle-tests-${version}-pinned-commit`,
tags: ['run-custom-dependency-tests'],
commands: [
{
func: 'install dependencies',
vars: {
NODE_LTS_VERSION: LOWEST_LTS,
NPM_VERSION: 8
}
]
});
}
},
{
func: 'bootstrap mongo-orchestration',
vars: {
VERSION: version,
TOPOLOGY: 'replica_set'
}
},
{ func: 'bootstrap kms servers' },
{
func: 'run custom csfle tests',
vars: {
CSFLE_GIT_REF: '5e922eb1302f1efbf4e8ddeb5f2ef113fd58ced0'
}
}
]
});
}

const coverageTask = {
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-bson-ext-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi
# run tests
echo "Running $AUTH tests over $SSL, connecting to $MONGODB_URI"

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

export MONGODB_API_VERSION=${MONGODB_API_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-serverless-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ -z ${MONGODB_URI+omitted} ]; then echo "MONGODB_URI is unset" && exit 1; fi
if [ -z ${SERVERLESS_ATLAS_USER+omitted} ]; then echo "SERVERLESS_ATLAS_USER is unset" && exit 1; fi
if [ -z ${SERVERLESS_ATLAS_PASSWORD+omitted} ]; then echo "SERVERLESS_ATLAS_PASSWORD is unset" && exit 1; fi

npm install mongodb-client-encryption
npm install "mongodb-client-encryption@2.x"

npx mocha \
--config test/mocha_mongodb.json \
Expand Down
3 changes: 2 additions & 1 deletion .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ else
echo "adding temporary AWS credentials to environment"
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
source "$DRIVERS_TOOLS"/.evergreen/csfle/set-temp-creds.sh

npm install "mongodb-client-encryption@2.x"
fi

npm install mongodb-client-encryption
npm install @mongodb-js/zstd
npm install snappy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1893,10 +1893,12 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
keyId: keyId,
algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'
});
// Copy ``ciphertext`` into a variable named ``malformedCiphertext``.
// Change the last byte to 0. This will produce an invalid HMAC tag.
// Copy ``ciphertext`` into a variable named ``malformedCiphertext``. Change the
// last byte to a different value. This will produce an invalid HMAC tag.
const buffer = Buffer.from(cipherText.buffer);
buffer.writeInt8(0, buffer.length - 1);
const lastByte = buffer.readUInt8(buffer.length - 1);
const replacementByte = lastByte === 0 ? 1 : 0;
buffer.writeUInt8(replacementByte, buffer.length - 1);
malformedCiphertext = new Binary(buffer, 6);
// Create a MongoClient named ``encryptedClient`` with these ``AutoEncryptionOpts``:
// AutoEncryptionOpts {
Expand Down

0 comments on commit 278523a

Please sign in to comment.