Workaround lack of template creation clean-up

This commit is contained in:
David M 2017-10-09 18:27:57 +02:00
parent 8a88b29665
commit b18bf967fd

View File

@ -135,15 +135,10 @@ describe('buffer size per format', function () {
const originalUsePostGIS = serverOptions.renderer.mvt.usePostGIS; const originalUsePostGIS = serverOptions.renderer.mvt.usePostGIS;
testCases.forEach(function (test) { testCases.forEach(function (test) {
var testFn = (usePostGIS) => { var testFn = (usePostGIS) => {
before(function () { it(test.desc, function (done) {
serverOptions.renderer.mvt.usePostGIS = usePostGIS; serverOptions.renderer.mvt.usePostGIS = usePostGIS;
});
after(function () {
serverOptions.renderer.mvt.usePostGIS = originalUsePostGIS;
});
it(test.desc, function (done) {
this.testClient = new TestClient(test.mapConfig, 1234); this.testClient = new TestClient(test.mapConfig, 1234);
serverOptions.renderer.mvt.usePostGIS = originalUsePostGIS;
var coords = test.coords; var coords = test.coords;
var options = { var options = {
format: test.format, format: test.format,
@ -449,14 +444,11 @@ describe('buffer size per format for named maps w/o placeholders', function () {
const originalUsePostGIS = serverOptions.renderer.mvt.usePostGIS; const originalUsePostGIS = serverOptions.renderer.mvt.usePostGIS;
testCases.forEach(function (test) { testCases.forEach(function (test) {
var testFn = (usePostGIS) => { var testFn = (usePostGIS) => {
before(function () { it(test.desc + `(${usePostGIS? 'PostGIS':'mapnik'})`, function (done) {
serverOptions.renderer.mvt.usePostGIS = usePostGIS; serverOptions.renderer.mvt.usePostGIS = usePostGIS;
}); test.template.name += '_1';
after(function () {
serverOptions.renderer.mvt.usePostGIS = originalUsePostGIS;
});
it(test.desc, function (done) {
this.testClient = new TestClient(test.template, 1234); this.testClient = new TestClient(test.template, 1234);
serverOptions.renderer.mvt.usePostGIS = originalUsePostGIS;
var coords = test.coords; var coords = test.coords;
var options = { var options = {
format: test.format, format: test.format,