Use another table
This commit is contained in:
parent
6437e2ec67
commit
53a40de2e7
@ -1,5 +1,3 @@
|
|||||||
require('../support/test_helper');
|
|
||||||
|
|
||||||
var assert = require('../support/assert');
|
var assert = require('../support/assert');
|
||||||
var TestClient = require('../support/test-client');
|
var TestClient = require('../support/test-client');
|
||||||
const LayergroupToken = require('../../lib/cartodb/models/layergroup-token');
|
const LayergroupToken = require('../../lib/cartodb/models/layergroup-token');
|
||||||
@ -40,12 +38,13 @@ describe('regressions', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('map instantiation', function () {
|
describe('map instantiation', function () {
|
||||||
|
const apikeyToken = 'regular1';
|
||||||
const mapConfig = {
|
const mapConfig = {
|
||||||
version: '1.7.0',
|
version: '1.7.0',
|
||||||
layers: [{
|
layers: [{
|
||||||
type: 'cartodb',
|
type: 'cartodb',
|
||||||
options: {
|
options: {
|
||||||
sql: 'select * from test_table',
|
sql: 'select * from test_table_localhost_regular1',
|
||||||
cartocss: TestClient.CARTOCSS.POINTS,
|
cartocss: TestClient.CARTOCSS.POINTS,
|
||||||
cartocss_version: '2.3.0'
|
cartocss_version: '2.3.0'
|
||||||
}
|
}
|
||||||
@ -53,7 +52,7 @@ describe('regressions', function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
it('should have distint timestamps when the source was updated', function (done) {
|
it('should have distint timestamps when the source was updated', function (done) {
|
||||||
const testClient = new TestClient(mapConfig);
|
const testClient = new TestClient(mapConfig, apikeyToken);
|
||||||
|
|
||||||
testClient.getLayergroup({}, (err, layergroup) => {
|
testClient.getLayergroup({}, (err, layergroup) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -64,7 +63,7 @@ describe('regressions', function() {
|
|||||||
|
|
||||||
const conn = testClient.getDBConnection();
|
const conn = testClient.getDBConnection();
|
||||||
|
|
||||||
const sql = `select CDB_TableMetadataTouch('test_table'::regclass)`;
|
const sql = `select CDB_TableMetadataTouch('test_table_localhost_regular1'::regclass)`;
|
||||||
|
|
||||||
conn.query(sql, (err) => {
|
conn.query(sql, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -465,6 +465,8 @@ CREATE INDEX test_table_localhost_regular1_the_geom_webmercator_idx ON test_tabl
|
|||||||
GRANT ALL ON TABLE test_table_localhost_regular1 TO :TESTUSER;
|
GRANT ALL ON TABLE test_table_localhost_regular1 TO :TESTUSER;
|
||||||
GRANT ALL ON TABLE test_table_localhost_regular1 TO test_windshaft_regular1;
|
GRANT ALL ON TABLE test_table_localhost_regular1 TO test_windshaft_regular1;
|
||||||
|
|
||||||
|
INSERT INTO CDB_TableMetadata (tabname, updated_at) VALUES ('test_table_localhost_regular1'::regclass, '2009-02-13T23:31:30.123Z');
|
||||||
|
|
||||||
-- analysis tables -----------------------------------------------
|
-- analysis tables -----------------------------------------------
|
||||||
|
|
||||||
ALTER TABLE cdb_analysis_catalog OWNER TO :TESTUSER;
|
ALTER TABLE cdb_analysis_catalog OWNER TO :TESTUSER;
|
||||||
|
Loading…
Reference in New Issue
Block a user