aboutsummaryrefslogtreecommitdiffstats
path: root/core/db/level-db_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/db/level-db_test.go')
-rw-r--r--core/db/level-db_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/db/level-db_test.go b/core/db/level-db_test.go
index df971ee..40f9a60 100644
--- a/core/db/level-db_test.go
+++ b/core/db/level-db_test.go
@@ -148,10 +148,10 @@ func (s *LevelDBTestSuite) TestCompactionChainTipInfo() {
s.Require().Equal(height, uint64(1))
// Unable to put compaction chain tip info with lower height.
err = dbInst.PutCompactionChainTipInfo(hash, 0)
- s.Require().IsType(err, ErrInvalidCompactionChainTipHeight)
+ s.Require().Equal(err.Error(), ErrInvalidCompactionChainTipHeight.Error())
// Unable to put compaction chain tip info with height not incremental by 1.
err = dbInst.PutCompactionChainTipInfo(hash, 3)
- s.Require().IsType(err, ErrInvalidCompactionChainTipHeight)
+ s.Require().Equal(err.Error(), ErrInvalidCompactionChainTipHeight.Error())
// It's OK to put compaction chain tip info with height incremental by 1.
s.Require().NoError(dbInst.PutCompactionChainTipInfo(hash, 2))
}
@@ -173,12 +173,12 @@ func (s *LevelDBTestSuite) TestDKGPrivateKey() {
s.Require().False(exists)
// We should be unable to get it, too.
_, err = dbInst.GetDKGPrivateKey(1)
- s.Require().IsType(err, ErrDKGPrivateKeyDoesNotExist)
+ s.Require().Equal(err.Error(), ErrDKGPrivateKeyDoesNotExist.Error())
// Put it.
s.Require().NoError(dbInst.PutDKGPrivateKey(1, *p))
// Put it again, should not success.
err = dbInst.PutDKGPrivateKey(1, *p)
- s.Require().IsType(err, ErrDKGPrivateKeyExists)
+ s.Require().Equal(err.Error(), ErrDKGPrivateKeyExists.Error())
// Get it back.
tmpPrv, err := dbInst.GetDKGPrivateKey(1)
s.Require().NoError(err)