mirror of https://github.com/citusdata/citus.git
Fix check-multi-1
parent
9796e0caa8
commit
f5dda3d1b2
|
@ -587,7 +587,7 @@ SET client_min_messages TO DEBUG;
|
|||
-- verify that we can create connections only with users with login privileges.
|
||||
SET ROLE role_without_login;
|
||||
SELECT citus_check_connection_to_node('localhost', :worker_1_port);
|
||||
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "role_without_login" is not permitted to log in
|
||||
WARNING: connection to the remote node role_without_login@localhost:xxxxx failed with the following error: FATAL: role "role_without_login" is not permitted to log in
|
||||
citus_check_connection_to_node
|
||||
---------------------------------------------------------------------
|
||||
f
|
||||
|
|
|
@ -730,7 +730,7 @@ ALTER USER test_user WITH nologin;
|
|||
\c - test_user - :master_port
|
||||
-- reissue copy, and it should fail
|
||||
COPY numbers_hash FROM STDIN WITH (FORMAT 'csv');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
|
||||
-- verify shards in the none of the workers as marked invalid
|
||||
SELECT shardid, shardstate, nodename, nodeport
|
||||
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
|
||||
|
@ -749,7 +749,7 @@ SELECT shardid, shardstate, nodename, nodeport
|
|||
|
||||
-- try to insert into a reference table copy should fail
|
||||
COPY numbers_reference FROM STDIN WITH (FORMAT 'csv');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
|
||||
-- verify shards for reference table are still valid
|
||||
SELECT shardid, shardstate, nodename, nodeport
|
||||
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
|
||||
|
@ -765,7 +765,7 @@ SELECT shardid, shardstate, nodename, nodeport
|
|||
-- since it can not insert into either copies of a shard. shards are expected to
|
||||
-- stay valid since the operation is rolled back.
|
||||
COPY numbers_hash_other FROM STDIN WITH (FORMAT 'csv');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
|
||||
-- verify shards for numbers_hash_other are still valid
|
||||
-- since copy has failed altogether
|
||||
SELECT shardid, shardstate, nodename, nodeport
|
||||
|
|
|
@ -1208,15 +1208,15 @@ set citus.enable_alter_role_propagation=true;
|
|||
SET search_path TO multi_modifying_xacts;
|
||||
-- should fail since the worker doesn't have test_user anymore
|
||||
INSERT INTO reference_failure_test VALUES (1, '1');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
-- the same as the above, but wrapped within a transaction
|
||||
BEGIN;
|
||||
INSERT INTO reference_failure_test VALUES (1, '1');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
COPY reference_failure_test FROM STDIN WITH (FORMAT 'csv');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
COMMIT;
|
||||
-- show that no data go through the table and shard states are good
|
||||
SET client_min_messages to 'ERROR';
|
||||
|
@ -1242,7 +1242,7 @@ ORDER BY s.logicalrelid, sp.shardstate;
|
|||
-- any failure rollbacks the transaction
|
||||
BEGIN;
|
||||
COPY numbers_hash_failure_test FROM STDIN WITH (FORMAT 'csv');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
ABORT;
|
||||
-- none of placements are invalid after abort
|
||||
SELECT shardid, shardstate, nodename, nodeport
|
||||
|
@ -1263,8 +1263,8 @@ ORDER BY shardid, nodeport;
|
|||
|
||||
-- verify nothing is inserted
|
||||
SELECT count(*) FROM numbers_hash_failure_test;
|
||||
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1290,7 +1290,7 @@ ORDER BY shardid, nodeport;
|
|||
-- all failures roll back the transaction
|
||||
BEGIN;
|
||||
COPY numbers_hash_failure_test FROM STDIN WITH (FORMAT 'csv');
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
COMMIT;
|
||||
-- expect none of the placements to be market invalid after commit
|
||||
SELECT shardid, shardstate, nodename, nodeport
|
||||
|
@ -1311,8 +1311,8 @@ ORDER BY shardid, nodeport;
|
|||
|
||||
-- verify no data is inserted
|
||||
SELECT count(*) FROM numbers_hash_failure_test;
|
||||
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1328,7 +1328,7 @@ set citus.enable_alter_role_propagation=true;
|
|||
SET search_path TO multi_modifying_xacts;
|
||||
-- fails on all shard placements
|
||||
INSERT INTO numbers_hash_failure_test VALUES (2,2);
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
|
||||
-- connect back to the master with the proper user to continue the tests
|
||||
\c - :default_user - :master_port
|
||||
SET search_path TO multi_modifying_xacts;
|
||||
|
|
|
@ -2703,10 +2703,10 @@ SET search_path TO multi_router_planner;
|
|||
-- still, we never mark placements inactive. Instead, fail the transaction
|
||||
BEGIN;
|
||||
INSERT INTO failure_test VALUES (1, 1);
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist
|
||||
ERROR: connection to the remote node router_user@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist
|
||||
ROLLBACK;
|
||||
INSERT INTO failure_test VALUES (2, 1);
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist
|
||||
ERROR: connection to the remote node router_user@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist
|
||||
SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement
|
||||
WHERE shardid IN (
|
||||
SELECT shardid FROM pg_dist_shard
|
||||
|
|
Loading…
Reference in New Issue