Add environment variable to check whether to run test against postgis 2.4 or not

This commit is contained in:
Daniel García Aubert 2017-10-16 11:08:46 +02:00
parent d959ef5007
commit 67ab12e8e7
3 changed files with 9 additions and 4 deletions

View File

@ -8,4 +8,4 @@ yarn
createdb template_postgis && createuser publicuser
psql -c "CREATE EXTENSION postgis" template_postgis
npm test
POSTGIS_VERSION=2.4 npm test

View File

@ -20,7 +20,9 @@ function createMapConfig(sql = TestClient.SQL.ONE_POINT) {
}
describe('mvt (mapnik)', mvt(false));
describe('mvt (postgis)', mvt(true));
if (process.env.POSTGIS_VERSION === '2.4') {
describe('mvt (postgis)', mvt(true));
}
function mvt(usePostGIS) {
return function () {

View File

@ -201,7 +201,10 @@ describe('user render timeout limit', function () {
});
});
if (process.env.POSTGIS_VERSION === '2.4') {
describe('vector (PostGIS)', vector(true));
}
describe('vector (mapnik)', vector(false));
function vector(usePostGIS) {
const originalUsePostGIS = serverOptions.renderer.mvt.usePostGIS;