fail test if db is nil

This commit is contained in:
Anton Lindström 2014-06-09 16:53:59 +00:00
parent 69833dab93
commit 568eb0c1c5
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ var secret = "EyaC2BPcJtNqU3tjEHy+c+Wmqc1yihYIbUWEl/jk0Ga73kWBclmuSFd9HuJKwJw/Wd
func TestPGStore(t *testing.T) { func TestPGStore(t *testing.T) {
ss := NewPGStore(os.Getenv("PGSTORE_TEST_CONN"), []byte(secret)) ss := NewPGStore(os.Getenv("PGSTORE_TEST_CONN"), []byte(secret))
if ss == nil {
t.Fatal("This test requires a real database")
}
defer ss.Close() defer ss.Close()
// ROUND 1 - Check that the cookie is being saved // ROUND 1 - Check that the cookie is being saved