diff --git a/lib/plugin.js b/lib/plugin.js index 3367a87d1..9993debff 100755 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -226,7 +226,7 @@ internals.Plugin.prototype.register = function (plugins /*, [options], callback for (var i = 0, il = selection.connections.length; i < il; ++i) { var connection = selection.connections[i]; - Hoek.assert(item.multiple || !connection._registrations[item.name], 'Plugin', item.name, 'already registered in:', connection.info.host + ':' + connection.settings.port); + Hoek.assert(item.multiple || !connection._registrations[item.name], 'Plugin', item.name, 'already registered in:', connection.info.uri); connection._registrations[item.name] = item; } diff --git a/lib/server.js b/lib/server.js index e064472d6..77d950a87 100755 --- a/lib/server.js +++ b/lib/server.js @@ -138,7 +138,7 @@ internals.Server.prototype.start = function (callback) { var connection = dependency.connections[s]; for (var d = 0, dl = dependency.deps.length; d < dl; ++d) { var dep = dependency.deps[d]; - Hoek.assert(connection._registrations[dep], 'Plugin', dependency.plugin, 'missing dependency', dep, 'in connection:', connection.info.host + ':' + connection.settings.port); + Hoek.assert(connection._registrations[dep], 'Plugin', dependency.plugin, 'missing dependency', dep, 'in connection:', connection.info.uri); } } } diff --git a/test/plugin.js b/test/plugin.js index f0b0bca2f..4d3320412 100755 --- a/test/plugin.js +++ b/test/plugin.js @@ -321,7 +321,7 @@ describe('Plugin', function () { expect(function () { server.register(test, function (err) { }); - }).to.throw('Plugin test already registered in: example.com:0'); + }).to.throw('Plugin test already registered in: http://example.com'); done(); }); @@ -1214,7 +1214,7 @@ describe('Plugin', function () { expect(function () { server.start(); - }).to.throw('Plugin test missing dependency none in connection: ' + Os.hostname() + ':0'); + }).to.throw('Plugin test missing dependency none in connection: ' + server.info.uri); done(); }); }); @@ -1228,7 +1228,7 @@ describe('Plugin', function () { expect(function () { server.start(); - }).to.throw('Plugin deps1 missing dependency deps2 in connection: localhost:80'); + }).to.throw('Plugin deps1 missing dependency deps2 in connection: http://localhost:80'); done(); }); }); @@ -1300,7 +1300,7 @@ describe('Plugin', function () { expect(function () { server.start(); - }).to.throw('Plugin b missing dependency c in connection: localhost:80'); + }).to.throw('Plugin b missing dependency c in connection: http://localhost:80'); done(); }); });