From 025e74612d8f1bc761d980f662d06ad31aa066d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Nieto?= <jose.carlos@menteslibres.net> Date: Tue, 16 Jun 2015 21:31:26 -0500 Subject: [PATCH] Fixes for test scripts. --- postgresql/_example/main.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/postgresql/_example/main.go b/postgresql/_example/main.go index 63777145..cd5d5ed9 100644 --- a/postgresql/_example/main.go +++ b/postgresql/_example/main.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "os" "time" "upper.io/db" // Imports the main db package. @@ -11,9 +12,9 @@ import ( var settings = db.Settings{ Database: `upperio_tests`, // Database name. - Host: `testserver.local`, - User: `upperio`, // Database username. - Password: `upperio`, // Database password. + Host: `127.0.0.1`, + User: `upperio_tests`, // Database username. + Password: `upperio_secret`, // Database password. } // Birthday example struct. @@ -26,6 +27,10 @@ type Birthday struct { func main() { + if os.Getenv("TEST_HOST") != "" { + settings.Host = os.Getenv("TEST_HOST") + } + // Attemping to establish a connection to the database. sess, err := db.Open("postgresql", settings) -- GitLab