Skip to content

Commit

Permalink
fix: Unify without setting expPaginationTotal when an error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kynea0b committed Aug 16, 2023
1 parent a22b4b7 commit 57862eb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions x/wasm/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ func TestQueryAllContractState(t *testing.T) {
expPaginationTotal: 3,
},
"query all with unknown address": {
srcQuery: &types.QueryAllContractStateRequest{Address: RandomBech32AccountAddress(t)},
expErr: types.ErrNotFound,
expPaginationTotal: 0,
srcQuery: &types.QueryAllContractStateRequest{Address: RandomBech32AccountAddress(t)},
expErr: types.ErrNotFound,
},
"with pagination offset": {
srcQuery: &types.QueryAllContractStateRequest{
Expand Down Expand Up @@ -616,8 +615,7 @@ func TestQueryCodeList(t *testing.T) {
Key: []byte("test"),
},
},
expPaginationTotal: 0,
expErr: fmt.Errorf("invalid request, either offset or key is expected, got both"),
expErr: fmt.Errorf("invalid request, either offset or key is expected, got both"),
},
"with pagination limit": {
storedCodeIDs: []uint64{1, 2, 3},
Expand All @@ -640,9 +638,8 @@ func TestQueryCodeList(t *testing.T) {
expPaginationTotal: 0,
},
"with empty request": {
req: nil,
expErr: status.Error(codes.InvalidArgument, "empty request"),
expPaginationTotal: 0,
req: nil,
expErr: status.Error(codes.InvalidArgument, "empty request"),
},
}

Expand Down

0 comments on commit 57862eb

Please sign in to comment.