From 4a74839aa5b4e18540effeefd731cc9c58687f35 Mon Sep 17 00:00:00 2001 From: Shahidh K Muhammed Date: Mon, 11 Mar 2019 12:45:48 +0530 Subject: [PATCH] add pgbouncer user --- .circleci/test-server.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/test-server.sh b/.circleci/test-server.sh index a8e854f54593e..403e0f483178d 100755 --- a/.circleci/test-server.sh +++ b/.circleci/test-server.sh @@ -366,8 +366,11 @@ echo -e "\n<########## TEST GRAPHQL-ENGINE WITH HORIZONTAL SCALING ########>\n" HASURA_HS_TEST_DB='postgres://postgres:postgres@localhost:6543/hs_hge_test' psql "$HASURA_GRAPHQL_DATABASE_URL" -c "create database hs_hge_test;" +# create pgbouncer user +useradd pgbouncer + # start pgbouncer -pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini +su -c "pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini" pgbouncer # start 1st server "$GRAPHQL_ENGINE" --database-url "$HASURA_HS_TEST_DB" serve >> "$OUTPUT_FOLDER/graphql-engine.log" 2>&1 & PID=$! @@ -386,7 +389,7 @@ pytest -vv --hge-url="$HGE_URL" --pg-url="$HASURA_GRAPHQL_DATABASE_URL" --test-h psql "postgres://postgres:postgres@localhost:6543/pgbouncer" -c "SHUTDOWN;" # start pgbouncer again -pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini +su -c "pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini" pgbouncer # run test pytest -vv --hge-url="$HGE_URL" --pg-url="$HASURA_GRAPHQL_DATABASE_URL" --test-hge-scale-url="http://localhost:8081" test_horizontal_scale.py