aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/test/health_test.js
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-08-21 14:26:13 -0700
committerGravatar murgatroid99 <mlumish@google.com>2015-08-21 14:26:13 -0700
commitda96957533c5288e679e2e5113c4ab3bfc0bef11 (patch)
tree89a63e3f3d97aa793dbdfd8f3cb1002acfef0c21 /src/node/test/health_test.js
parentc5dac97bd3b1e87b228d0d130ce2cb457297fdd0 (diff)
parent3c807eac69acd711620aaf7ab44fd79ce406b35e (diff)
Merge branch 'master' into node_server_graceful_shutdown
Diffstat (limited to 'src/node/test/health_test.js')
-rw-r--r--src/node/test/health_test.js24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/node/test/health_test.js b/src/node/test/health_test.js
index 22c58d3956..9267bff7eb 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();
- });
- });
});