Skip to content

Commit

Permalink
fix rpc modules mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jimjbrettj committed Jan 9, 2023
1 parent 3aba5ae commit a5924b7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dot/rpc/modules/api_mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/runtime"
mocksruntime "github.com/ChainSafe/gossamer/lib/runtime/mocks"
"github.com/stretchr/testify/mock"
)

Expand Down Expand Up @@ -49,6 +50,8 @@ func NewMockeryBlockAPI(t *testing.T) *modulesmocks.BlockAPI {
Return(make([]common.Hash, 0), nil).Maybe()
m.On("RegisterRuntimeUpdatedChannel", mock.AnythingOfType("chan<- runtime.Version")).
Return(uint32(0), nil).Maybe()
// GetRuntime(blockHash common.Hash) (instance state.Runtime, err error)
m.On("GetRuntime", mock.AnythingOfType("common.Hash")).Return(mocksruntime.NewInstance(t), nil).Maybe()

return m
}
Expand Down
39 changes: 39 additions & 0 deletions lib/runtime/mocks/instance.go

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

0 comments on commit a5924b7

Please sign in to comment.