Fix 018.detach_primary test.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 14 May 2021 22:30:43 +0000 (07:30 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 14 May 2021 22:30:43 +0000 (07:30 +0900)
commit81684bb226ca5add2ce5e0ed080dcbbcc541e608
treefac57ab7884246e977ed84233bd591c4e3c15566
parent7eb7d4b94c1014f7503c2180d7ca252a75d9c29c
Fix 018.detach_primary test.

The script tried to extract primary node id from the results of show
pool_nodes.  From 4.3 it includes the actual backend status. As a
result the script could accidentally picks up a node id which is
actually a standby (but has primary status as PostgreSQL) from
Pgpool-II's point of view.

This resulted in a shell syntax error here because $primary_node could
have node "0 2" for example.

if [ $primary_node != 0 ];then
src/test/regression/tests/018.detach_primary/test.sh