Skip to content

Commit a8cfa18

Browse files
committed
Add tests for [email protected] on travis
1 parent b9f8011 commit a8cfa18

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ params := $(connectionString)
77
node-command := xargs -n 1 -I file node file $(params)
88

99
.PHONY : test test-connection test-integration bench test-native \
10-
build/default/binding.node jshint
10+
build/default/binding.node jshint upgrade-pg
1111

1212
all:
1313
npm install
@@ -20,6 +20,12 @@ test: test-unit
2020

2121
test-all: jshint test-unit test-integration test-native test-binary
2222

23+
test-travis: test-all upgrade-pg test-integration test-native test-binary
24+
25+
upgrade-pg:
26+
@chmod 755 script/travis-pg-9.2-install.sh
27+
@./script/travis-pg-9.2-install.sh
28+
2329
bench:
2430
@find benchmark -name "*-bench.js" | $(node-command)
2531

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"semver": "~1.1.4"
2727
},
2828
"scripts": {
29-
"test": "make test-all connectionString=pg://postgres@localhost:5432/postgres",
29+
"test": "make test-travis connectionString=pg://postgres@localhost:5432/postgres",
3030
"prepublish": "rm -r build || (exit 0)",
3131
"install": "node-gyp rebuild || (exit 0)"
3232
},

script/travis-pg-9.2-install.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#! /usr/bin/env bash
2+
#sudo cat /etc/postgresql/9.1/main/pg_hba.conf
3+
#sudo cat /etc/postgresql/9.1/main/pg_ident.conf
4+
#sudo cat /etc/postgresql/9.1/main/postgresql.conf
5+
sudo /etc/init.d/postgresql stop
6+
sudo apt-get -y --purge remove postgresql
7+
echo "yes" | sudo add-apt-repository ppa:pitti/postgresql
8+
sudo apt-get update -qq
9+
sudo apt-get -q -y -o Dpkg::Options::=--force-confdef install postgresql-9.2 postgresql-contrib-9.2
10+
sudo chmod 777 /etc/postgresql/9.2/main/pg_hba.conf
11+
sudo echo "local all postgres trust" > /etc/postgresql/9.2/main/pg_hba.conf
12+
sudo echo "local all all trust" >> /etc/postgresql/9.2/main/pg_hba.conf
13+
sudo echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/9.2/main/pg_hba.conf
14+
sudo echo "host all all ::1/128 trust" >> /etc/postgresql/9.2/main/pg_hba.conf
15+
sudo echo "host all all 0.0.0.0/0 trust" >> /etc/postgresql/9.2/main/pg_hba.conf
16+
sudo echo "host all all 0.0.0.0 255.255.255.255 trust" >> /etc/postgresql/9.2/main/pg_hba.conf
17+
sudo /etc/init.d/postgresql restart
18+
node script/create-test-tables.js pg://[email protected]:5432/postgres

0 commit comments

Comments
 (0)