Skip tests if they cannot be run

If configured with `mvt.usePostGIS` but with no postgis version
supporting it, they should be skipped.
This commit is contained in:
Rafa de la Torre
2018-10-17 17:35:36 +02:00
parent d474d49ce8
commit e50d1a10d0
+6 -1
View File
@@ -2,8 +2,13 @@
const assert = require('assert');
const TestClient = require('../support/test-client');
const mapConfigFactory = require('../fixtures/test_mapconfigFactory');
const serverOptions = require('../../lib/cartodb/server_options');
describe('date-wrapping', () => {
const usePgMvtRenderer = serverOptions.renderer.mvt.usePostGIS;
const postgisVersion = process.env.POSTGIS_VERSION;
const describe_mvt = postgisVersion >= '20400' || !usePgMvtRenderer ? describe : describe.skip;
describe_mvt('date-wrapping', () => {
let testClient;
describe('when a map instantiation has one single layer', () => {