Fix postgres test bug
Add travis CI for test run