mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Fixed lint errors
This commit is contained in:
parent
5ea756598e
commit
0274189082
@ -71,7 +71,7 @@ var fakeSuccessfulGoogleCredentials = {
|
||||
var fakeFailingGoogleCredentials = {
|
||||
getRequestMetadata: function(service_url, callback) {
|
||||
setTimeout(function() {
|
||||
callback(new Error("Authorization failure"));
|
||||
callback(new Error('Authorization failure'));
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
@ -219,14 +219,14 @@ describe('client credentials', function() {
|
||||
});
|
||||
});
|
||||
it('Should not add metadata with just SSL credentials', function(done) {
|
||||
// Tests idempotency of credentials composition
|
||||
var metadataUpdater = function(service_url, callback) {
|
||||
var metadata = new grpc.Metadata();
|
||||
metadata.set('plugin_key', 'plugin_value');
|
||||
callback(null, metadata);
|
||||
};
|
||||
var creds = grpc.credentials.createFromMetadataGenerator(metadataUpdater);
|
||||
var combined_creds = grpc.credentials.combineChannelCredentials(
|
||||
client_ssl_creds, creds);
|
||||
grpc.credentials.combineChannelCredentials(client_ssl_creds, creds);
|
||||
var client = new Client('localhost:' + port, client_ssl_creds,
|
||||
client_options);
|
||||
var call = client.unary({}, function(err, data) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user