diff --git a/lib/cartodb/server.js b/lib/cartodb/server.js index ad998ef9..a200b062 100644 --- a/lib/cartodb/server.js +++ b/lib/cartodb/server.js @@ -79,22 +79,22 @@ function getAndValidateVersions(options) { windshaft_cartodb: packageDefinition.version }; - var dependenciesToValidate = ['camshaft', 'turbo-carto', 'windshaft']; - dependenciesToValidate.forEach(function(depName) { - var declaredDependencyVersion = declaredDependencies[depName]; - var installedDependencyVersion = installedDependenciesVersions[depName]; - if (!semver.satisfies(installedDependencyVersion,declaredDependencyVersion)) { - warn( - 'Dependency="%s" installed version="%s" does not match declared version="%s". Check your installation.', - depName, installedDependencyVersion, declaredDependencyVersion - ); - } - }); + if (process.env.NODE_ENV !== 'test') { + var dependenciesToValidate = ['camshaft', 'turbo-carto', 'windshaft']; + dependenciesToValidate.forEach(function(depName) { + var declaredDependencyVersion = declaredDependencies[depName]; + var installedDependencyVersion = installedDependenciesVersions[depName]; + if (!semver.satisfies(installedDependencyVersion,declaredDependencyVersion)) { + warn(`Dependency="${depName}" installed version="${installedDependencyVersion}" does ` + + `not match declared version="${declaredDependencyVersion}". Check your installation.`); + } + }); - // Be nice and warn if configured mapnik version is != installed mapnik version - if (windshaft.mapnik.versions.mapnik !== options.grainstore.mapnik_version) { - warn('WARNING: detected mapnik version (' + windshaft.mapnik.versions.mapnik + ')' + - ' != configured mapnik version (' + options.grainstore.mapnik_version + ')'); + // Be nice and warn if configured mapnik version is != installed mapnik version + if (windshaft.mapnik.versions.mapnik !== options.grainstore.mapnik_version) { + warn('WARNING: detected mapnik version (' + windshaft.mapnik.versions.mapnik + ')' + + ' != configured mapnik version (' + options.grainstore.mapnik_version + ')'); + } } return installedDependenciesVersions;