Skip to content

Commit

Permalink
test: migrate e2e/auth to system tests and fix sign-batch (#22149)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4733fc1)
  • Loading branch information
akhilkumarpilli authored and mergify[bot] committed Oct 11, 2024
1 parent a96debd commit ac62ead
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 ac62ead

Please sign in to comment.