Fix tests to use map-config builder properly
This commit is contained in:
parent
c066e2c3cf
commit
ef39f23d1f
74
test/acceptance/cache/cache-control-header.js
vendored
74
test/acceptance/cache/cache-control-header.js
vendored
@ -36,14 +36,16 @@ describe('cache-control header', function () {
|
|||||||
describe('max-age directive', function () {
|
describe('max-age directive', function () {
|
||||||
it('tile from a table which is included in cdb_tablemetada', function (done) {
|
it('tile from a table which is included in cdb_tablemetada', function (done) {
|
||||||
const ttl = ONE_YEAR_IN_SECONDS;
|
const ttl = ONE_YEAR_IN_SECONDS;
|
||||||
const mapConfig = createMapConfig([{
|
const mapConfig = createMapConfig({
|
||||||
type: 'cartodb',
|
layers: [{
|
||||||
options: {
|
type: 'cartodb',
|
||||||
sql: 'select * from test_table',
|
options: {
|
||||||
cartocss: TestClient.CARTOCSS.POINTS,
|
sql: 'select * from test_table',
|
||||||
cartocss_version: '2.3.0'
|
cartocss: TestClient.CARTOCSS.POINTS,
|
||||||
}
|
cartocss_version: '2.3.0'
|
||||||
}]);
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
const testClient = new TestClient(mapConfig);
|
const testClient = new TestClient(mapConfig);
|
||||||
|
|
||||||
@ -59,14 +61,16 @@ describe('cache-control header', function () {
|
|||||||
|
|
||||||
it('tile from a table which is NOT included in cdb_tablemetada', function (done) {
|
it('tile from a table which is NOT included in cdb_tablemetada', function (done) {
|
||||||
const ttl = global.environment.varnish.fallbackTtl || FIVE_MINUTES_IN_SECONDS;
|
const ttl = global.environment.varnish.fallbackTtl || FIVE_MINUTES_IN_SECONDS;
|
||||||
const mapConfig = createMapConfig([{
|
const mapConfig = createMapConfig({
|
||||||
type: 'cartodb',
|
layers: [{
|
||||||
options: {
|
type: 'cartodb',
|
||||||
sql: 'select * from test_table_2',
|
options: {
|
||||||
cartocss: TestClient.CARTOCSS.POINTS,
|
sql: 'select * from test_table_2',
|
||||||
cartocss_version: '2.3.0'
|
cartocss: TestClient.CARTOCSS.POINTS,
|
||||||
}
|
cartocss_version: '2.3.0'
|
||||||
}]);
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
const testClient = new TestClient(mapConfig);
|
const testClient = new TestClient(mapConfig);
|
||||||
|
|
||||||
@ -82,24 +86,26 @@ describe('cache-control header', function () {
|
|||||||
|
|
||||||
it('tile from joined tables which one of them is NOT included in cdb_tablemetada', function (done) {
|
it('tile from joined tables which one of them is NOT included in cdb_tablemetada', function (done) {
|
||||||
const ttl = global.environment.varnish.fallbackTtl || FIVE_MINUTES_IN_SECONDS;
|
const ttl = global.environment.varnish.fallbackTtl || FIVE_MINUTES_IN_SECONDS;
|
||||||
const mapConfig = createMapConfig([{
|
const mapConfig = createMapConfig({
|
||||||
type: 'cartodb',
|
layers: [{
|
||||||
options: {
|
type: 'cartodb',
|
||||||
sql: `
|
options: {
|
||||||
select
|
sql: `
|
||||||
t.cartodb_id,
|
select
|
||||||
t.the_geom,
|
t.cartodb_id,
|
||||||
t.the_geom_webmercator
|
t.the_geom,
|
||||||
from
|
t.the_geom_webmercator
|
||||||
test_table t,
|
from
|
||||||
test_table_2 t2
|
test_table t,
|
||||||
where
|
test_table_2 t2
|
||||||
t.cartodb_id = t2.cartodb_id
|
where
|
||||||
`,
|
t.cartodb_id = t2.cartodb_id
|
||||||
cartocss: TestClient.CARTOCSS.POINTS,
|
`,
|
||||||
cartocss_version: '2.3.0'
|
cartocss: TestClient.CARTOCSS.POINTS,
|
||||||
}
|
cartocss_version: '2.3.0'
|
||||||
}]);
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
const testClient = new TestClient(mapConfig);
|
const testClient = new TestClient(mapConfig);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user