Skip to content

Commit

Permalink
test: fix kms test
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed May 6, 2024
1 parent 920a61e commit 8da6c4a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type AzureKMSRequestOptions,
fetchAzureKMSToken
} from '../../../src/client-side-encryption/providers/azure';
import { type Document } from '../../mongodb';
import { type Document, MongoNetworkTimeoutError } from '../../mongodb';

const BASE_URL = new URL(`http://127.0.0.1:8080/metadata/identity/oauth2/token`);
class KMSRequestOptions implements AzureKMSRequestOptions {
Expand Down Expand Up @@ -119,7 +119,7 @@ context('Azure KMS Mock Server Tests', function () {
it('returns an error after the request times out', async () => {
const error = await fetchAzureKMSToken(new KMSRequestOptions('slow')).catch(e => e);

expect(error).to.be.instanceof(MongoCryptAzureKMSRequestError);
expect(error).to.be.instanceof(MongoNetworkTimeoutError);
});
});
});

0 comments on commit 8da6c4a

Please sign in to comment.