Skip to content

Commit

Permalink
make mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Jul 10, 2023
1 parent cecd051 commit 2b3590e
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 151 deletions.
2 changes: 1 addition & 1 deletion scripts/mockgen.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

mockgen_cmd="mockgen"
$mockgen_cmd -source=baseapp/abci_utils.go -package mock -destination baseapp/testutil/mock/validator_store.go
$mockgen_cmd -source=baseapp/abci_utils.go -package mock -destination baseapp/testutil/mock/mocks.go
$mockgen_cmd -source=client/account_retriever.go -package mock -destination testutil/mock/account_retriever.go
$mockgen_cmd -package mock -destination store/mock/cosmos_cosmos_db_DB.go github.com/cosmos/cosmos-db DB
$mockgen_cmd -source=types/module/module.go -package mock -destination testutil/mock/types_module_module.go
Expand Down
29 changes: 0 additions & 29 deletions testutil/mock/types_mock_appmodule.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113 changes: 0 additions & 113 deletions testutil/mock/types_module_module.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions types/module/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ func TestBasicManager(t *testing.T) {
mockAppModuleBasic1.EXPECT().ValidateGenesis(gomock.Eq(cdc), gomock.Eq(nil), gomock.Eq(expDefaultGenesis["mockAppModuleBasic1"])).AnyTimes().Return(nil)
mockAppModuleBasic1.EXPECT().RegisterLegacyAminoCodec(gomock.Eq(legacyAmino)).Times(1)
mockAppModuleBasic1.EXPECT().RegisterInterfaces(gomock.Eq(interfaceRegistry)).Times(1)
mockAppModuleBasic1.EXPECT().GetTxCmd().Times(1).Return(nil)
mockAppModuleBasic1.EXPECT().GetQueryCmd().Times(1).Return(nil)

// mock core API module
mockCoreAppModule2 := mock.NewMockCoreAppModule(mockCtrl)
Expand Down
6 changes: 0 additions & 6 deletions x/auth/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

abci "github.com/cometbft/cometbft/abci/types"
gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"

modulev1 "cosmossdk.io/api/cosmos/auth/module/v1"
"cosmossdk.io/core/address"
Expand Down Expand Up @@ -78,11 +77,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g
}
}

// GetQueryCmd returns the root query command for the auth module.
func (ab AppModuleBasic) GetQueryCmd() *cobra.Command {
return nil
}

// RegisterInterfaces registers interfaces and implementations of the auth module.
func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
types.RegisterInterfaces(registry)
Expand Down

0 comments on commit 2b3590e

Please sign in to comment.