test registry config

This commit is contained in:
Girish Ramakrishnan
2019-10-23 06:11:17 -07:00
parent 8cdddef077
commit b6f2c94464
2 changed files with 7 additions and 1 deletions

View File

@@ -68,7 +68,12 @@ function testRegistryConfig(auth, callback) {
assert.strictEqual(typeof auth, 'object');
assert.strictEqual(typeof callback, 'function');
return callback(null);
let docker = exports.connection;
docker.checkAuth(auth, function (error /*, data */) { // this returns a 500 even for auth errors
if (error) return callback(new BoxError(BoxError.BAD_FIELD, error, { field: 'serverAddress' }));
callback();
});
}
function injectPrivateFields(newConfig, currentConfig) {