mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-24 14:35:47 +00:00
fix: shamir mock setup for machine issuance test
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
62fe799eca
commit
c133a1fd79
@ -64,8 +64,8 @@ func Load(t *testing.T, configs ...Config) *Network {
|
||||
}, nil)
|
||||
shamirMock.EXPECT().IssueMachineNFT(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(clients.IssueMachineNFTResponse{
|
||||
HexTX: "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
Contract: "contract",
|
||||
Asset: "7add40beb27df701e02ee85089c5bc0021bc813823fedb5f1dcb5debda7f3da9",
|
||||
Contract: `{"entity":{"domain":"testnet-assets.rddl.io"}, "issuer_pubkey":"02", "machine_addr":"addr","name":"machine","precicion":8,"version":1}`,
|
||||
Asset: "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
}, nil)
|
||||
clients.ShamirCoordinatorServiceClient = shamirMock
|
||||
|
||||
|
||||
@ -9,7 +9,10 @@ import (
|
||||
"testing"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/planetmint/planetmint-go/clients"
|
||||
"github.com/planetmint/planetmint-go/testutil/keeper"
|
||||
clientmocks "github.com/planetmint/planetmint-go/testutil/mocks"
|
||||
"github.com/planetmint/planetmint-go/testutil/moduleobject"
|
||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||
"github.com/planetmint/planetmint-go/util"
|
||||
@ -47,7 +50,15 @@ func TestRegisterNFT(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMachineNFTIssuance(t *testing.T) {
|
||||
ctrl := gomock.NewController(t)
|
||||
elements.Client = &elementsmocks.MockClient{}
|
||||
shamirMock := clientmocks.NewMockIShamirCoordinatorClient(ctrl)
|
||||
shamirMock.EXPECT().IssueMachineNFT(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(clients.IssueMachineNFTResponse{
|
||||
HexTX: "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
Contract: `{"entity":{"domain":"testnet-assets.rddl.io"}, "issuer_pubkey":"02", "machine_addr":"addr","name":"machine","precicion":8,"version":1}`,
|
||||
Asset: "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
}, nil)
|
||||
clients.ShamirCoordinatorServiceClient = shamirMock
|
||||
util.RegisterAssetServiceHTTPClient = &mocks.MockClient{}
|
||||
_, ctx := keeper.MachineKeeper(t)
|
||||
params := types.DefaultParams()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user