Skip to content

Fix Python tests and remove CircleCI-specific path #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 9 additions & 9 deletions .circleci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/python/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down