diff --git a/Vagrantfile b/Vagrantfile index af72177e..07c24a51 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -80,6 +80,46 @@ $make_devenv = </dev/null; then + echo "host all all 127.0.0.1/32 trust" > "$pg_hba_conf" +fi + +# Avoid SQL query statement being truncated in pg_stat_activity, which is +# convenient for debugging. +pg_conf=/var/lib/pgsql/data/postgresql.conf +if ! grep "track_activity_query_size = 4096" "$pg_conf" >/dev/null; then + echo "track_activity_query_size = 4096" >> "$pg_conf" +fi + +# Restart to apply configuration changes +systemctl restart postgresql + +psql -U postgres -h 127.0.0.1 -c "DROP DATABASE IF EXISTS mbstest" +psql -U postgres -h 127.0.0.1 -c "CREATE DATABASE mbstest" + +bashrc=/home/vagrant/.bashrc + +echo "******** Run Tests with PostgreSQL ********" +echo "Set this environment variable to test with PostgreSQL" +echo "export DATABASE_URI=postgresql+psycopg2://postgres:@127.0.0.1/mbstest" +echo +PGSQL + $script_services = <