Skip to content

Commit

Permalink
Merge pull request #12 from ph0bos/curator-incompatibility-fix
Browse files Browse the repository at this point in the history
Don't set default scheme on registration data object
  • Loading branch information
jonrobins committed Nov 19, 2015
2 parents 0cca05d + b39ff5a commit 428a033
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 4 deletions.
3 changes: 0 additions & 3 deletions lib/ServiceInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
/**
* Statics
*/
var DEFAULT_SCHEME = 'http';

var DEFAULT_URI_SPEC =
{
parts: [
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
28 changes: 28 additions & 0 deletions test/fixtures/curator.json
Original file line number Diff line number Diff line change
@@ -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
}]
}
}
30 changes: 30 additions & 0 deletions test/fixtures/zoologist.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 428a033

Please sign in to comment.