aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/test/surface_test.js
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-09-25 16:04:03 -0700
committerGravatar murgatroid99 <mlumish@google.com>2015-09-25 16:04:03 -0700
commit153b09d0395456ab1523d4316585665e4e831f82 (patch)
tree0e5c2fb9ca54b6f8a1f7aa6da48d74762105c137 /src/node/test/surface_test.js
parent8cde3d7c20445289f7072f29029e44870beecc37 (diff)
Reworked credentials surface API, added test
Diffstat (limited to 'src/node/test/surface_test.js')
-rw-r--r--src/node/test/surface_test.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js
index d917c7a171..09585d9842 100644
--- a/src/node/test/surface_test.js
+++ b/src/node/test/surface_test.js
@@ -163,7 +163,7 @@ describe('waitForClientReady', function() {
Client = surface_client.makeProtobufClientConstructor(mathService);
});
beforeEach(function() {
- client = new Client('localhost:' + port, grpc.Credentials.createInsecure());
+ client = new Client('localhost:' + port, grpc.credentials.createInsecure());
});
after(function() {
server.forceShutdown();
@@ -217,7 +217,7 @@ describe('Echo service', function() {
});
var port = server.bind('localhost:0', server_insecure_creds);
var Client = surface_client.makeProtobufClientConstructor(echo_service);
- client = new Client('localhost:' + port, grpc.Credentials.createInsecure());
+ client = new Client('localhost:' + port, grpc.credentials.createInsecure());
server.start();
});
after(function() {
@@ -263,7 +263,7 @@ describe('Generic client and server', function() {
server.start();
var Client = grpc.makeGenericClientConstructor(string_service_attrs);
client = new Client('localhost:' + port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
});
after(function() {
server.forceShutdown();
@@ -311,7 +311,7 @@ describe('Echo metadata', function() {
});
var port = server.bind('localhost:0', server_insecure_creds);
var Client = surface_client.makeProtobufClientConstructor(test_service);
- client = new Client('localhost:' + port, grpc.Credentials.createInsecure());
+ client = new Client('localhost:' + port, grpc.credentials.createInsecure());
server.start();
metadata = new grpc.Metadata();
metadata.set('key', 'value');
@@ -437,7 +437,7 @@ describe('Other conditions', function() {
});
port = server.bind('localhost:0', server_insecure_creds);
Client = surface_client.makeProtobufClientConstructor(test_service);
- client = new Client('localhost:' + port, grpc.Credentials.createInsecure());
+ client = new Client('localhost:' + port, grpc.credentials.createInsecure());
server.start();
});
after(function() {
@@ -484,7 +484,7 @@ describe('Other conditions', function() {
var Client = surface_client.makeClientConstructor(test_service_attrs,
'TestService');
misbehavingClient = new Client('localhost:' + port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
});
it('should respond correctly to a unary call', function(done) {
misbehavingClient.unary(badArg, function(err, data) {
@@ -725,7 +725,7 @@ describe('Other conditions', function() {
var proxy_port = proxy.bind('localhost:0', server_insecure_creds);
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
var call = proxy_client.unary({}, function(err, value) {
done();
});
@@ -748,7 +748,7 @@ describe('Other conditions', function() {
var proxy_port = proxy.bind('localhost:0', server_insecure_creds);
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
var call = proxy_client.clientStream(function(err, value) {
done();
});
@@ -769,7 +769,7 @@ describe('Other conditions', function() {
var proxy_port = proxy.bind('localhost:0', server_insecure_creds);
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
var call = proxy_client.serverStream({});
call.on('error', function(err) {
done();
@@ -790,7 +790,7 @@ describe('Other conditions', function() {
var proxy_port = proxy.bind('localhost:0', server_insecure_creds);
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
var call = proxy_client.bidiStream();
call.on('error', function(err) {
done();
@@ -819,7 +819,7 @@ describe('Other conditions', function() {
var proxy_port = proxy.bind('localhost:0', server_insecure_creds);
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
var deadline = new Date();
deadline.setSeconds(deadline.getSeconds() + 1);
proxy_client.clientStream(function(err, value) {
@@ -842,7 +842,7 @@ describe('Other conditions', function() {
var proxy_port = proxy.bind('localhost:0', server_insecure_creds);
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
var deadline = new Date();
deadline.setSeconds(deadline.getSeconds() + 1);
var call = proxy_client.bidiStream(null, {deadline: deadline});
@@ -866,7 +866,7 @@ describe('Cancelling surface client', function() {
});
var port = server.bind('localhost:0', server_insecure_creds);
var Client = surface_client.makeProtobufClientConstructor(mathService);
- client = new Client('localhost:' + port, grpc.Credentials.createInsecure());
+ client = new Client('localhost:' + port, grpc.credentials.createInsecure());
server.start();
});
after(function() {