diff options
author | Noah Eisen <ncteisen@gmail.com> | 2016-10-24 11:26:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-24 11:26:25 -0700 |
commit | ab0c5de658a1ec0e62f4765e95642e008851e8a9 (patch) | |
tree | ffcc1dc9e5cf5c1b04a4d1973efea086f92f863c /src | |
parent | 2065702a754eb528d91a019fa9252cf1b043baa0 (diff) | |
parent | e207228e9e45808c75f990a3159efd8030c18643 (diff) |
Merge pull request #8467 from ncteisen/node_unimplemented_method
Implement Node Unimplemented Method Interop Test
Diffstat (limited to 'src')
-rw-r--r-- | src/node/interop/interop_client.js | 16 | ||||
-rw-r--r-- | src/node/test/interop_sanity_test.js | 4 |
2 files changed, 18 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}, diff --git a/src/node/test/interop_sanity_test.js b/src/node/test/interop_sanity_test.js index f008a87585..58f8842c0d 100644 --- a/src/node/test/interop_sanity_test.js +++ b/src/node/test/interop_sanity_test.js @@ -98,6 +98,10 @@ describe('Interop tests', function() { interop_client.runTest(port, name_override, 'status_code_and_message', true, true, done); }); + it('should pass unimplemented_service', function(done) { + interop_client.runTest(port, name_override, 'unimplemented_service', + true, true, done); + }); it('should pass unimplemented_method', function(done) { interop_client.runTest(port, name_override, 'unimplemented_method', true, true, done); |