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. // expected error.
dbType := "unsupported" dbType := "unsupported"
_, err := btcdb.CreateDB(dbType, "unsupportedcreatetest") _, err := btcdb.CreateDB(dbType, "unsupportedcreatetest")
if err != btcdb.DbUnknownType { if err != btcdb.ErrDbUnknownType {
t.Errorf("TestCreateOpenUnsupported: expected error not "+ t.Errorf("TestCreateOpenUnsupported: expected error not "+
"received - got: %v, want %v", err, btcdb.DbUnknownType) "received - got: %v, want %v", err, btcdb.ErrDbUnknownType)
return return
} }
// Ensure opening a database with the new type fails with the expected // Ensure opening a database with the new type fails with the expected
// error. // error.
_, err = btcdb.OpenDB(dbType, "unsupportedopentest") _, err = btcdb.OpenDB(dbType, "unsupportedopentest")
if err != btcdb.DbUnknownType { if err != btcdb.ErrDbUnknownType {
t.Errorf("TestCreateOpenUnsupported: expected error not "+ t.Errorf("TestCreateOpenUnsupported: expected error not "+
"received - got: %v, want %v", err, btcdb.DbUnknownType) "received - got: %v, want %v", err, btcdb.ErrDbUnknownType)
return return
} }
} }