Skip to content

Commit

Permalink
test: migrate e2e/auth to system tests and fix sign-batch (backport #…
Browse files Browse the repository at this point in the history
…22149) (#22234)

Co-authored-by: Akhil Kumar P <[email protected]>
  • Loading branch information
mergify[bot] and akhilkumarpilli authored Oct 11, 2024
1 parent a96debd commit ba5966f
Show file tree
Hide file tree
Showing 7 changed files with 538 additions and 1,852 deletions.
24 changes: 22 additions & 2 deletions client/account_retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ type Account interface {
GetSequence() uint64
}

type mockAccount struct {
addr []byte
}

func (m mockAccount) GetAddress() sdk.AccAddress {
return m.addr
}

func (m mockAccount) GetPubKey() cryptotypes.PubKey {
return nil
}

func (m mockAccount) GetAccountNumber() uint64 {
return 0
}

func (m mockAccount) GetSequence() uint64 {
return 0
}

// AccountRetriever defines the interfaces required by transactions to
// ensure an account exists and to be able to query for account fields necessary
// for signing.
Expand All @@ -32,8 +52,8 @@ type MockAccountRetriever struct {
ReturnAccNum, ReturnAccSeq uint64
}

func (mar MockAccountRetriever) GetAccount(_ Context, _ sdk.AccAddress) (Account, error) {
return nil, nil
func (mar MockAccountRetriever) GetAccount(_ Context, address sdk.AccAddress) (Account, error) {
return mockAccount{addr: address}, nil
}

func (mar MockAccountRetriever) GetAccountWithHeight(_ Context, _ sdk.AccAddress) (Account, int64, error) {
Expand Down
20 changes: 0 additions & 20 deletions tests/e2e/auth/cli_test.go

This file was deleted.

Loading

0 comments on commit ba5966f

Please sign in to comment.