Use docker for apps-test

This commit is contained in:
Girish Ramakrishnan
2019-08-20 13:34:18 -07:00
parent d9e45f732b
commit b8a4e1c4a3

View File

@@ -489,7 +489,8 @@ function getByIpAddress(ip, callback) {
assert.strictEqual(typeof ip, 'string');
assert.strictEqual(typeof callback, 'function');
if (constants.TEST) return get(exports._MOCK_GET_BY_IP_APP_ID, callback);
// this is only used by the ldap test. the apps tests still uses proper docker
if (constants.TEST && exports._MOCK_GET_BY_IP_APP_ID) return get(exports._MOCK_GET_BY_IP_APP_ID, callback);
docker.getContainerIdByIp(ip, function (error, containerId) {
if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, error));