diff options
author | Craig Tiller <ctiller@google.com> | 2015-08-24 14:32:54 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-08-24 14:32:54 -0700 |
commit | 11c3c68f9d72d3f7d410b660dd4dc134762f70fa (patch) | |
tree | 558c2cfbf1b88c504cad0e7c6f2e1f1d001eaf6f /src/node/test/health_test.js | |
parent | 7f4fc98704fa5130f4919139427338ca6b309a52 (diff) | |
parent | ddb0b8c4956b986a26cbbcabd4c4d81b9391770d (diff) |
Merge github.com:grpc/grpc into endpoints
Diffstat (limited to 'src/node/test/health_test.js')
-rw-r--r-- | src/node/test/health_test.js | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/node/test/health_test.js b/src/node/test/health_test.js index be4ef1d251..04959f5f55 100644 --- a/src/node/test/health_test.js +++ b/src/node/test/health_test.js @@ -41,13 +41,9 @@ var grpc = require('../'); describe('Health Checking', function() { var statusMap = { - '': { - '': 'SERVING', - 'grpc.test.TestService': 'NOT_SERVING', - }, - virtual_host: { - 'grpc.test.TestService': 'SERVING' - } + '': 'SERVING', + 'grpc.test.TestServiceNotServing': 'NOT_SERVING', + 'grpc.test.TestServiceServing': 'SERVING' }; var healthServer = new grpc.Server(); healthServer.addProtoService(health.service, @@ -71,15 +67,15 @@ describe('Health Checking', function() { }); }); it('should say that a disabled service is NOT_SERVING', function(done) { - healthClient.check({service: 'grpc.test.TestService'}, + healthClient.check({service: 'grpc.test.TestServiceNotServing'}, function(err, response) { assert.ifError(err); assert.strictEqual(response.status, 'NOT_SERVING'); done(); }); }); - it('should say that a service on another host is SERVING', function(done) { - healthClient.check({host: 'virtual_host', service: 'grpc.test.TestService'}, + it('should say that an enabled service is SERVING', function(done) { + healthClient.check({service: 'grpc.test.TestServiceServing'}, function(err, response) { assert.ifError(err); assert.strictEqual(response.status, 'SERVING'); @@ -93,12 +89,4 @@ describe('Health Checking', function() { done(); }); }); - it('should get NOT_FOUND if the host is not registered', function(done) { - healthClient.check({host: 'wrong_host', service: 'grpc.test.TestService'}, - function(err, response) { - assert(err); - assert.strictEqual(err.code, grpc.status.NOT_FOUND); - done(); - }); - }); }); |