Skip to content

Commit e6ff085

Browse files
committed
test: only test CSFLE on LTS versions of node
1 parent 13bb49c commit e6ff085

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/tools/runner/filters/client_encryption_filter.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict';
22

33
const mongodb = require('../../../../index');
4+
const semver = require('semver');
5+
46
/**
57
* Filter for whether or not a test needs / doesn't need Client Side Encryption
68
*
@@ -40,8 +42,11 @@ class ClientSideEncryptionFilter {
4042
const clientSideEncryption =
4143
test.metadata && test.metadata.requires && test.metadata.requires.clientSideEncryption;
4244

45+
// CSFLE is only supported on LTS versions of node
46+
const nodeSupportsCSFLE = semver.satisfies(process.version, '>4');
47+
4348
const ret = typeof clientSideEncryption !== 'boolean' || clientSideEncryption === this.enabled;
44-
return ret;
49+
return ret && nodeSupportsCSFLE;
4550
}
4651
}
4752

0 commit comments

Comments
 (0)