Fix tests.

This commit is contained in:
John C. Vernaleo 2014-09-16 15:13:31 -04:00
parent a7ac93f5b6
commit d6945f94e6

View file

@ -151,18 +151,18 @@ func TestCreateOpenUnsupported(t *testing.T) {
// expected error.
dbType := "unsupported"
_, err := btcdb.CreateDB(dbType, "unsupportedcreatetest")
if err != btcdb.DbUnknownType {
if err != btcdb.ErrDbUnknownType {
t.Errorf("TestCreateOpenUnsupported: expected error not "+
"received - got: %v, want %v", err, btcdb.DbUnknownType)
"received - got: %v, want %v", err, btcdb.ErrDbUnknownType)
return
}
// Ensure opening a database with the new type fails with the expected
// error.
_, err = btcdb.OpenDB(dbType, "unsupportedopentest")
if err != btcdb.DbUnknownType {
if err != btcdb.ErrDbUnknownType {
t.Errorf("TestCreateOpenUnsupported: expected error not "+
"received - got: %v, want %v", err, btcdb.DbUnknownType)
"received - got: %v, want %v", err, btcdb.ErrDbUnknownType)
return
}
}