diff --git a/lib/ServiceInstance.js b/lib/ServiceInstance.js index 345c5ff..e025bfb 100644 --- a/lib/ServiceInstance.js +++ b/lib/ServiceInstance.js @@ -10,8 +10,6 @@ /** * Statics */ -var DEFAULT_SCHEME = 'http'; - var DEFAULT_URI_SPEC = { parts: [ @@ -55,7 +53,6 @@ ServiceInstance.prototype.getData = function() { name: this.name, address: this.address, port: this.port, - scheme: DEFAULT_SCHEME, sslPort: null, payload: null, registrationTimeUTC: this.registrationTimeUTC || Date.now(), diff --git a/package.json b/package.json index f2480d9..680c434 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zoologist", - "version": "0.4.9", + "version": "0.4.10", "description": "A Curator-esque framework for ZooKeeper", "main": "index.js", "keywords": [ diff --git a/test/fixtures/curator.json b/test/fixtures/curator.json new file mode 100644 index 0000000..3bf58de --- /dev/null +++ b/test/fixtures/curator.json @@ -0,0 +1,28 @@ +{ + "name": "pipeline/superdesk/content/v0.1", + "id": "b0b7b427-1b49-4493-afa6-763cecf30253", + "address": "52.31.63.137", + "port": 10000, + "sslPort": null, + "payload": null, + "registrationTimeUTC": 1447867258151, + "serviceType": "DYNAMIC", + "uriSpec": { + "parts": [{ + "value": "scheme", + "variable": true + }, { + "value": "://", + "variable": false + }, { + "value": "address", + "variable": true + }, { + "value": ":", + "variable": false + }, { + "value": "port", + "variable": true + }] + } +} diff --git a/test/fixtures/zoologist.json b/test/fixtures/zoologist.json new file mode 100644 index 0000000..e019d26 --- /dev/null +++ b/test/fixtures/zoologist.json @@ -0,0 +1,30 @@ +{ + "id": "db3362a7-da09-4409-a5be-469032afd982", + "name": "publish/content/notification-relay/v0.1", + "address": "10.0.1.141", + "port": 10003, + "scheme": "http", + "sslPort": null, + "payload": null, + "registrationTimeUTC": 1446831186749, + "serviceType": "DYNAMIC", + "uriSpec": { + "parts": [{ + "value": "scheme", + "variable": true + }, { + "value": "://", + "variable": false + }, { + "value": "address", + "variable": true + }, { + "value": ":", + "variable": false + }, { + "value": "port", + "variable": true + }] + }, + "basePath": "services" +}