Make transaction-rollback=true the default for test-suite (#1663)
Change test-suite to use db-tx-rollback-all = true by default
This commit is contained in:
Vendored
+12
@@ -359,6 +359,9 @@ TRUNCATE TABLE child_entities CASCADE;
|
||||
INSERT INTO child_entities VALUES (1, 'child entity 1', 1);
|
||||
INSERT INTO child_entities VALUES (2, 'child entity 2', 1);
|
||||
INSERT INTO child_entities VALUES (3, 'child entity 3', 2);
|
||||
INSERT INTO child_entities VALUES (4, 'child entity 4', 1);
|
||||
INSERT INTO child_entities VALUES (5, 'child entity 5', 1);
|
||||
INSERT INTO child_entities VALUES (6, 'child entity 6', 2);
|
||||
|
||||
TRUNCATE TABLE grandchild_entities CASCADE;
|
||||
INSERT INTO grandchild_entities VALUES (1, 'grandchild entity 1', 1, null, null, null);
|
||||
@@ -626,8 +629,17 @@ INSERT INTO unit_workdays VALUES(1, '2019-12-02', 1, 1, 2, 3);
|
||||
TRUNCATE TABLE v1.parents CASCADE;
|
||||
INSERT INTO v1.parents VALUES(1, 'parent v1-1'), (2, 'parent v1-2');
|
||||
|
||||
TRUNCATE TABLE v1.children CASCADE;
|
||||
INSERT INTO v1.children VALUES(1, 'child v1-1', 1), (2, 'child v1-2', 2);
|
||||
|
||||
TRUNCATE TABLE v2.parents CASCADE;
|
||||
INSERT INTO v2.parents VALUES(3, 'parent v2-3'), (4, 'parent v2-4');
|
||||
|
||||
TRUNCATE TABLE v2.children CASCADE;
|
||||
INSERT INTO v2.children VALUES(1, 'child v2-3', 3);
|
||||
|
||||
TRUNCATE TABLE v2.another_table CASCADE;
|
||||
INSERT INTO v2.another_table VALUES(5, 'value 5'), (6, 'value 6');
|
||||
|
||||
TRUNCATE TABLE private.stuff CASCADE;
|
||||
INSERT INTO private.stuff (id, name) VALUES (1, 'stuff 1');
|
||||
|
||||
Vendored
-2
@@ -144,8 +144,6 @@ GRANT USAGE ON SEQUENCE
|
||||
, items_id_seq
|
||||
, callcounter_count
|
||||
, leak_id_seq
|
||||
, v1.children_id_seq
|
||||
, v2.children_id_seq
|
||||
TO postgrest_test_anonymous;
|
||||
|
||||
-- Privileges for non anonymous users
|
||||
|
||||
Vendored
+13
-3
@@ -365,6 +365,16 @@ CREATE FUNCTION callcounter() RETURNS bigint
|
||||
SELECT nextval('test.callcounter_count');
|
||||
$_$;
|
||||
|
||||
CREATE FUNCTION reset_sequence(name TEXT, value INTEGER) RETURNS void
|
||||
SECURITY DEFINER
|
||||
LANGUAGE plpgsql AS $_$
|
||||
BEGIN
|
||||
EXECUTE FORMAT($exec$
|
||||
ALTER SEQUENCE %s RESTART WITH %s
|
||||
$exec$, name, value);
|
||||
END
|
||||
$_$;
|
||||
|
||||
--
|
||||
-- Name: singlejsonparam(json); Type: FUNCTION; Schema: test; Owner: -
|
||||
--
|
||||
@@ -1825,8 +1835,8 @@ create table v1.parents (
|
||||
);
|
||||
|
||||
create table v1.children (
|
||||
id serial primary key
|
||||
, name text
|
||||
id int primary key
|
||||
, name text
|
||||
, parent_id int
|
||||
, constraint parent foreign key(parent_id)
|
||||
references v1.parents(id)
|
||||
@@ -1843,7 +1853,7 @@ create table v2.parents (
|
||||
);
|
||||
|
||||
create table v2.children (
|
||||
id serial primary key
|
||||
id int primary key
|
||||
, name text
|
||||
, parent_id int
|
||||
, constraint parent foreign key(parent_id)
|
||||
|
||||
Reference in New Issue
Block a user