Fix Python tests and remove CircleCI-specific path (#106)

* Remove CircleCI-specific path in tests

* ..?

* Fix testsP

* Fix python test

* remove pip

* Maybe fail?

* return code?

* no &

* Fix tests
This commit is contained in:
Mostafa Abdelraouf
2022-08-02 17:52:22 -05:00
committed by GitHub
parent 20e8f9d74c
commit 5ac85eaadd
3 changed files with 11 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ jobs:
command: "cargo fmt --check"
- run:
name: "Install dependencies"
command: "sudo apt-get update && sudo apt-get install -y psmisc postgresql-contrib-12 postgresql-client-12 ruby ruby-dev libpq-dev python"
command: "sudo apt-get update && sudo apt-get install -y psmisc postgresql-contrib-12 postgresql-client-12 ruby ruby-dev libpq-dev python3 python3-pip"
- run:
name: "Build"
command: "cargo build"

View File

@@ -66,19 +66,19 @@ psql -U sharding_user -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_te
#
# ActiveRecord tests
#
cd tests/ruby && \
sudo gem install bundler && \
bundle install && \
ruby tests.rb
cd /home/circleci/project
cd tests/ruby
sudo gem install bundler
bundle install
ruby tests.rb
cd ../..
#
# Python tests
#
cd tests/python && \
pip install -r requirements.txt && \
python tests.py
cd /home/circleci/project
cd tests/python
pip3 install -r requirements.txt
python3 tests.py
cd ../..
# Admin tests

View File

@@ -10,7 +10,7 @@ def test_normal_db_access():
def test_admin_db_access():
conn = psycopg2.connect("postgres://user:pass@127.0.0.1:6432/pgcat")
conn = psycopg2.connect("postgres://admin_user:admin_pass@127.0.0.1:6432/pgcat")
conn.autocommit = True # BEGIN/COMMIT is not supported by admin db
cur = conn.cursor()