feat: replace the cosmos-db usecases in the tests with core/testing (backport #21525) (#21720)

Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2024-09-13 20:18:05 +00:00
committed by GitHub
co-authored by cool-developer Julien Robert
parent 64beb97259
commit 150d17c3fc
84 changed files with 576 additions and 523 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"path/filepath"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
db "github.com/cosmos/cosmos-db"
dbm "github.com/cosmos/cosmos-db"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protodesc"
@@ -30,7 +30,7 @@ import (
// similar to a real app. Make sure rootDir is empty before running the test,
// in order to guarantee consistent results.
func NewApp(rootDir string, logger log.Logger) (servertypes.ABCI, error) {
db, err := db.NewGoLevelDB("mock", filepath.Join(rootDir, "data"), nil)
db, err := dbm.NewGoLevelDB("mock", filepath.Join(rootDir, "data"), nil)
if err != nil {
return nil, err
}
+2 -2
View File
@@ -3,14 +3,14 @@ package mock
import (
"testing"
dbm "github.com/cosmos/cosmos-db"
"github.com/stretchr/testify/require"
coretesting "cosmossdk.io/core/testing"
storetypes "cosmossdk.io/store/types"
)
func TestStore(t *testing.T) {
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
cms := NewCommitMultiStore()