Skip to content

Commit 5f8265d

Browse files
authored
test(NODE-5179): remove ctr cipher tests (#611)
1 parent 84f252e commit 5f8265d

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

test/cryptoCallbacks.test.js

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -196,48 +196,6 @@ describe('cryptoCallbacks', function () {
196196
});
197197
});
198198

199-
// AES-256-CTR is used specifically with FLE2 only
200-
['aes256CtrEncryptHook', 'aes256CtrDecryptHook'].forEach(hookName => {
201-
it(`should properly propagate an error when ${hookName} fails`, function (done) {
202-
const error = new Error('some random error text');
203-
this.sinon.stub(cryptoCallbacks, hookName).returns(error);
204-
205-
const encryption = new ClientEncryption(this.client, {
206-
keyVaultNamespace: 'test.encryption',
207-
kmsProviders
208-
});
209-
210-
function finish(err) {
211-
try {
212-
expect(err, 'Expected an error to exist').to.exist;
213-
expect(err).to.have.property('message', error.message);
214-
done();
215-
} catch (e) {
216-
done(e);
217-
}
218-
}
219-
220-
try {
221-
encryption.createDataKey('aws', dataKeyOptions, (err, dataKey) => {
222-
if (err) return finish(err);
223-
224-
const encryptOptions = {
225-
keyId: dataKey,
226-
algorithm: 'Indexed',
227-
contentionFactor: 0
228-
};
229-
230-
encryption.encrypt('hello', encryptOptions, (err, encryptedValue) => {
231-
if (err) return finish(err);
232-
encryption.decrypt(encryptedValue, err => finish(err));
233-
});
234-
});
235-
} catch (e) {
236-
done(new Error('We should not be here'));
237-
}
238-
});
239-
});
240-
241199
// These ones will fail with an error, but that error will get overridden
242200
// with "failed to create KMS message" in mongocrypt-kms-ctx.c
243201
['hmacSha256Hook', 'sha256Hook'].forEach(hookName => {

0 commit comments

Comments
 (0)