refactor: decouple comet from modules (#21382)

This commit is contained in:
son trinh
2024-09-11 09:18:13 +00:00
committed by GitHub
parent 04cec5b5e5
commit 1d4ecd5e37
32 changed files with 1702 additions and 5169 deletions
+2 -6
View File
@@ -5,8 +5,6 @@ import (
"io"
"testing"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/spf13/pflag"
"github.com/stretchr/testify/suite"
@@ -51,7 +49,7 @@ func (s *CLITestSuite) SetupSuite() {
WithKeyring(s.kr).
WithTxConfig(s.encCfg.TxConfig).
WithCodec(s.encCfg.Codec).
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
WithClient(clitestutil.MockCometRPC{}).
WithAccountRetriever(client.MockAccountRetriever{}).
WithOutput(io.Discard).
WithChainID("test-chain").
@@ -61,9 +59,7 @@ func (s *CLITestSuite) SetupSuite() {
ctxGen := func() client.Context {
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockCometRPC(abci.QueryResponse{
Value: bz,
})
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen()