From 568eb0c1c5d76e10a597ade0a6687a999ed3ed36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Lindstr=C3=B6m?= Date: Mon, 9 Jun 2014 16:53:59 +0000 Subject: [PATCH] fail test if db is nil --- pgstore_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pgstore_test.go b/pgstore_test.go index d32377d..5aa8221 100644 --- a/pgstore_test.go +++ b/pgstore_test.go @@ -26,6 +26,10 @@ var secret = "EyaC2BPcJtNqU3tjEHy+c+Wmqc1yihYIbUWEl/jk0Ga73kWBclmuSFd9HuJKwJw/Wd func TestPGStore(t *testing.T) { ss := NewPGStore(os.Getenv("PGSTORE_TEST_CONN"), []byte(secret)) + if ss == nil { + t.Fatal("This test requires a real database") + } + defer ss.Close() // ROUND 1 - Check that the cookie is being saved