db_test.go 197 B

1234567891011121314
  1. package main
  2. import (
  3. "testing"
  4. )
  5. func TestWrongDB(t *testing.T) {
  6. *confDBPass = "wrongpassword"
  7. _, err := getDB()
  8. if err == nil {
  9. t.Errorf("get db should fail with wrong db config")
  10. }
  11. }