diff options
author | Noah Eisen <ncteisen@google.com> | 2016-10-21 17:32:33 -0700 |
---|---|---|
committer | Noah Eisen <ncteisen@google.com> | 2016-10-21 17:32:33 -0700 |
commit | a48afeb1f0442b0be98a987a6f19f27355e79226 (patch) | |
tree | 35c50e51ed56f8d9f8aa247cc799ad48aa8882d6 /src/node/interop | |
parent | 99e61f884d0c2b1e1e2af9a41ec2018b47041fec (diff) |
change unimplemented_method to unimplemented_service. Add real unimplemented_method test for node
Diffstat (limited to 'src/node/interop')
-rw-r--r-- | src/node/interop/interop_client.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index e8f2d37bd8..a59a66b2aa 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -375,7 +375,8 @@ function statusCodeAndMessage(client, done) { duplex.end(); } -function unimplementedMethod(client, done) { +// NOTE: the client param to this function is from UnimplementedService +function unimplementedService(client, done) { client.unimplementedCall({}, function(err, resp) { assert(err); assert.strictEqual(err.code, grpc.status.UNIMPLEMENTED); @@ -384,6 +385,15 @@ function unimplementedMethod(client, done) { }); } +// NOTE: the client param to this function is from TestService +function unimplementedMethod(client, done) { + client.unimplementedCall({}, function(err, resp) { + assert(err); + assert.strictEqual(err.code, grpc.status.UNIMPLEMENTED); + done(); + }); +} + /** * Run one of the authentication tests. * @param {string} expected_user The expected username in the response @@ -527,8 +537,10 @@ var test_cases = { Client: testProto.TestService}, status_code_and_message: {run: statusCodeAndMessage, Client: testProto.TestService}, - unimplemented_method: {run: unimplementedMethod, + unimplemented_service: {run: unimplementedService, Client: testProto.UnimplementedService}, + unimplemented_method: {run: unimplementedMethod, + Client: testProto.TestService}, compute_engine_creds: {run: computeEngineCreds, Client: testProto.TestService, getCreds: getApplicationCreds}, |