Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Trying to add some tests #1

Merged
merged 1 commit into from
Oct 5, 2016
Merged

Trying to add some tests #1

merged 1 commit into from
Oct 5, 2016

Conversation

j0k3r
Copy link
Member

@j0k3r j0k3r commented Sep 21, 2016

⚠️ 🚧

So it's impossible to test it on Travis for now 😥

PostgreSQL is build with default Python path, aka 'PYTHON=/usr/bin/python' (checked using pg_config, which is 2.7.6)

But with virtualenv and python env defined, everything is under /home/travis/virtualenv/python2.7.10/. This mean the python binary is at /home/travis/virtualenv/python2.7.10/bin/python.

Since they aren't the same, installed module with default Python binary – ie 2.7.6 – (PostgreSQL & multicorn) aren't the same as other one installed using virtualenv – ie 2.7.10 – (pg_rabbitmq).

So, when trying to install the multicorn_rabbitmq server, it can't find the module pg_rabbitmq.

travis@testing-gce-5077b681-6732-4feb-a2f4-115ad9e6ec79:/tmp/multicorn$ psql -U postgres -d travis_ci_test -c "CREATE SERVER multicorn_rabbitmq FOREIGN DATA WRAPPER multicorn OPTIONS ( wrapper 'pg_rabbitmq.RabbitmqFDW' );"
ERROR:  Error in python: ImportError
DETAIL:  No module named pg_rabbitmq

Trying to move the default binary away and replace with the virtualenv one, doesn't help.

sudo mv /usr/bin/python /usr/bin/python-old
sudo ln -s /home/travis/virtualenv/python2.7.10/bin/python /usr/bin/python
sudo service postgresql restart

One solution should be to recompile PostgreSQL by changing the path to Python (as suggested here)

I've also tried using a completely different env by defining language: php but it doesn't use the default python, but an other installed one in /opt/python/2.7.10/lib/python2.7 ....


Finally switching to Docker to run my own PostgreSQL, compile the extension & define the FDW inside it (using the Dockerfile) ✅ 🙋‍♂️

@j0k3r j0k3r merged commit 9c83d63 into master Oct 5, 2016
@j0k3r j0k3r deleted the tests branch October 5, 2016 07:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

1 participant