jstests/client_encrypt/fle_gcp_faults.js
// OAuth faults must be tested first so a cached token can't be used
OAuth faults must be tested first so a cached token can't be used
OAuth faults must be tested first so a cached token can ' t be used
function testBadOAuthRequestResult() {
    const mock_kms = new MockKMSServerGCP(FAULT_OAUTH, false);
    runKMS(mock_kms, (shell) => {
        const keyVault = shell.getKeyVault();
        const error = assert.throws(() => keyVault.createKey("gcp", mockKey, ["mongoKey"]));
        assert.eq(
            error,
            "Error: code 9: FailedToParse: Expecting '{': offset:0 of:Internal Error of some sort.");
    });
}
function testBadOAuthRequestResult ( ) { const mock_kms = new MockKMSServerGCP ( FAULT_OAUTH , false ) ; runKMS ( mock_kms , ( shell ) => { const keyVault = shell . getKeyVault ( ) ; const error = assert . throws ( ( ) => keyVault . createKey ( "gcp" , mockKey , [ "mongoKey" ] ) ) ; assert . eq ( error , "Error: code 9: FailedToParse: Expecting '{': offset:0 of:Internal Error of some sort." ) ; } ) ; }
OAuth faults must be tested first so a cached token can't be used
OAuth faults must be tested first so a cached token can ' t be used