Make other tests resilient to CDB_SyncTable test failures
Use a transaction to avoid leaving stuff after our tests, that affect Quota and User Tables tests.
This commit is contained in:
parent
f442c21fa4
commit
45c21d7f42
@ -1,5 +1,6 @@
|
||||
-- Setup: create and populate a table to test the syncs
|
||||
\set QUIET on
|
||||
BEGIN;
|
||||
SET client_min_messages TO error;
|
||||
CREATE TABLE test_sync_source (
|
||||
cartodb_id bigint,
|
||||
@ -15,6 +16,7 @@ INSERT INTO test_sync_source VALUES
|
||||
SET client_min_messages TO notice;
|
||||
\set QUIET off
|
||||
|
||||
|
||||
\echo 'First table sync: it should be simply just copied to the destination'
|
||||
SELECT cartodb.CDB_SyncTable('test_sync_source', 'public', 'test_sync_dest');
|
||||
|
||||
@ -37,8 +39,6 @@ SELECT cartodb.CDB_SyncTable('test_sync_source', 'public', 'test_sync_dest');
|
||||
SELECT * FROM test_sync_source ORDER BY cartodb_id;
|
||||
SELECT * FROM test_sync_dest ORDER BY cartodb_id;
|
||||
|
||||
|
||||
-- Cleanup
|
||||
\set QUIET on
|
||||
DROP TABLE IF EXISTS test_sync_source;
|
||||
DROP TABLE IF EXISTS test_sync_dest;
|
||||
\set QUIET off
|
||||
ROLLBACK;
|
||||
|
@ -37,3 +37,4 @@ Sanity check: the end result is the same source table
|
||||
2|2|2|bar
|
||||
4|4|4|cantaloupe
|
||||
5|5|5|sandia
|
||||
ROLLBACK
|
||||
|
Loading…
Reference in New Issue
Block a user