Skip to content

Commit e77b065

Browse files
cleanups?
1 parent 4b68c16 commit e77b065

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

.evergreen/run-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ SSL=${SSL:-nossl}
2828
if [ "$SSL" != "nossl" ]; then
2929
export TLS_KEY_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/client.pem"
3030
export TLS_CA_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/ca.pem"
31-
export TLS_CRL_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/crl.pem"
3231
fi
3332

3433
# run tests

test/tools/utils.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,36 +115,29 @@ export function getEncryptExtraOptions(): MongoClientOptions['autoEncryption']['
115115

116116
export function getTLSOptions(): Pick<
117117
MongoClientOptions,
118-
'tls' | 'tlsCertificateKeyFile' | 'tlsCAFile' | 'tlsCRLFile'
118+
'tls' | 'tlsCertificateKeyFile' | 'tlsCAFile'
119119
> {
120120
if (!isTLSEnabled) return {};
121121

122-
const requiredTLSEnv = ['TLS_KEY_FILE', 'TLS_CA_FILE', 'TLS_CRL_FILE'];
122+
const requiredTLSEnv = ['TLS_KEY_FILE', 'TLS_CA_FILE'];
123123
const missingVariables = requiredTLSEnv.filter(key => process.env[key] == null);
124124

125125
if (missingVariables.length)
126126
throw new Error(
127127
`TLS requires the following additional environment variables: ${missingVariables.join(',')}`
128128
);
129129

130-
const {
131-
TLS_KEY_FILE: tlsCertificateKeyFile,
132-
TLS_CA_FILE: tlsCAFile,
133-
TLS_CRL_FILE: tlsCRLFile
134-
} = process.env;
130+
const { TLS_KEY_FILE: tlsCertificateKeyFile, TLS_CA_FILE: tlsCAFile } = process.env;
135131

136132
return {
137133
tlsCertificateKeyFile,
138134
tlsCAFile,
139-
tlsCRLFile,
140135
tls: true
141136
};
142137
}
143138

144-
export function getEnvironmentalOptions(): Pick<
145-
MongoClientOptions,
146-
'tls' | 'tlsCertificateKeyFile' | 'tlsCAFile' | 'tlsCRLFile' | 'serverApi'
147-
> {
139+
export function getEnvironmentalOptions(): ReturnType<typeof getTLSOptions> &
140+
Pick<MongoClientOptions, 'serverApi'> {
148141
const options: ReturnType<typeof getEnvironmentalOptions> = {};
149142

150143
if (process.env.MONGODB_API_VERSION) {

0 commit comments

Comments
 (0)