mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-27 02:36:29 +00:00
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:
committed by
GitHub
parent
20e8f9d74c
commit
5ac85eaadd
@@ -32,7 +32,7 @@ jobs:
|
|||||||
command: "cargo fmt --check"
|
command: "cargo fmt --check"
|
||||||
- run:
|
- run:
|
||||||
name: "Install dependencies"
|
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:
|
- run:
|
||||||
name: "Build"
|
name: "Build"
|
||||||
command: "cargo build"
|
command: "cargo build"
|
||||||
|
|||||||
@@ -66,19 +66,19 @@ psql -U sharding_user -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_te
|
|||||||
#
|
#
|
||||||
# ActiveRecord tests
|
# ActiveRecord tests
|
||||||
#
|
#
|
||||||
cd tests/ruby && \
|
cd tests/ruby
|
||||||
sudo gem install bundler && \
|
sudo gem install bundler
|
||||||
bundle install && \
|
bundle install
|
||||||
ruby tests.rb
|
ruby tests.rb
|
||||||
cd /home/circleci/project
|
cd ../..
|
||||||
|
|
||||||
#
|
#
|
||||||
# Python tests
|
# Python tests
|
||||||
#
|
#
|
||||||
cd tests/python && \
|
cd tests/python
|
||||||
pip install -r requirements.txt && \
|
pip3 install -r requirements.txt
|
||||||
python tests.py
|
python3 tests.py
|
||||||
cd /home/circleci/project
|
cd ../..
|
||||||
|
|
||||||
|
|
||||||
# Admin tests
|
# Admin tests
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ def test_normal_db_access():
|
|||||||
|
|
||||||
|
|
||||||
def test_admin_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
|
conn.autocommit = True # BEGIN/COMMIT is not supported by admin db
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user