Skip to content

Commit

Permalink
Using process.env.POSTGRES_HOST to allow a postgres inside a docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
emerleite committed Oct 25, 2014
1 parent 60a51d0 commit 6d851b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/postgresql.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ var should = require('should'),
DatabaseCleaner = require('../lib/database-cleaner'),
databaseCleaner = new DatabaseCleaner('postgresql');

var connectionString = "postgres://postgres@localhost/database_cleaner";

var dbHost = process.env.POSTGRES_HOST || 'localhost';

var connectionString = 'postgres://postgres@' + dbHost + '/database_cleaner';

var pg = require('pg');

Expand Down

0 comments on commit 6d851b5

Please sign in to comment.