From 756fe8a7943d2709db22c2aae58c459296ed4255 Mon Sep 17 00:00:00 2001 From: NikitaUnisikhin Date: Mon, 18 Mar 2024 07:27:02 +0000 Subject: [PATCH] fix --- docker/bin/setup | 9 ++++++++- docker/xproto/test.sh | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docker/bin/setup b/docker/bin/setup index ceb3b1ff5..48231a8d3 100755 --- a/docker/bin/setup +++ b/docker/bin/setup @@ -49,7 +49,7 @@ sudo -u postgres /usr/bin/pg_basebackup -D /var/lib/postgresql/14/repl -R -h loc sudo -u postgres /usr/lib/postgresql/14/bin/pg_ctl -D /var/lib/postgresql/14/repl/ -o '-p 5433' start # Create databases -for database_name in db scram_db ldap_db auth_query_db db1 hba_db tsa_db addr_db xproto_db; do +for database_name in db scram_db ldap_db auth_query_db db1 hba_db tsa_db addr_db xproto_db "spqr-console"; do sudo -u postgres createdb $database_name >> "$SETUP_LOG" 2>&1 || { echo "ERROR: 'createdb $database_name' failed, examine the log" cat "$SETUP_LOG" @@ -178,6 +178,13 @@ psql -h localhost -p 5432 -U postgres -c "create user xproto" -d xproto_db >> $S exit 1 } +psql -h localhost -p 5432 -U postgres -c "create user \"spqr-console\"" -d "spqr-console" >> $SETUP_LOG 2>&1 || { + echo "ERROR: users creation failed, examine the log" + cat "$SETUP_LOG" + cat "$PG_LOG" + exit 1 +} + # Grant access for ldap_storage_credentials psql -h localhost -p 5432 -U postgres -c "GRANT ALL ON DATABASE ldap_db1 TO ldap_readonly" -d postgres >> $SETUP_LOG 2>&1 || { diff --git a/docker/xproto/test.sh b/docker/xproto/test.sh index 32962f314..9de9c67aa 100755 --- a/docker/xproto/test.sh +++ b/docker/xproto/test.sh @@ -2,4 +2,4 @@ git clone https://github.com/pg-sharding/spqr.git /xproto/spqr cp /xproto/spqr/test/xproto/proto_test.go /xproto/proto_test.go rm -rf /xproto/spqr docker build -t xproto-tests /xproto -docker run -e POSTGRES_HOST=localhost -e POSTGRES_PORT=5432 -e POSTGRES_DB=xproto_db -e POSTGRES_USER=xproto --network=host xproto-tests \ No newline at end of file +docker run -e POSTGRES_HOST=odyssey -e POSTGRES_PORT=6432 -e POSTGRES_DB=xproto_db -e POSTGRES_USER=xproto --network=odyssey_od_net xproto-tests \ No newline at end of file