Skip to content

Commit

Permalink
src instead of srcQuery in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NotJeremyLiu committed Dec 27, 2023
1 parent b17c9fb commit e405904
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions x/wasm/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1050,16 +1050,16 @@ func TestEnsurePaginationParams(t *testing.T) {

func TestQueryBuildAddress(t *testing.T) {
specs := map[string]struct {
srcQuery *types.QueryBuildAddressRequest
exp *types.QueryBuildAddressResponse
expErr error
src *types.QueryBuildAddressRequest
exp *types.QueryBuildAddressResponse
expErr error
}{
"empty request": {
srcQuery: nil,
expErr: status.Error(codes.InvalidArgument, "empty request"),
src: nil,
expErr: status.Error(codes.InvalidArgument, "empty request"),
},
"valid - without init args": {
srcQuery: &types.QueryBuildAddressRequest{
src: &types.QueryBuildAddressRequest{
CodeHash: "13a1fc994cc6d1c81b746ee0c0ff6f90043875e0bf1d9be6b7d779fc978dc2a5",
CreatorAddress: "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz",
Salt: "61",
Expand All @@ -1071,7 +1071,7 @@ func TestQueryBuildAddress(t *testing.T) {
expErr: nil,
},
"valid - with init args": {
srcQuery: &types.QueryBuildAddressRequest{
src: &types.QueryBuildAddressRequest{
CodeHash: "13a1fc994cc6d1c81b746ee0c0ff6f90043875e0bf1d9be6b7d779fc978dc2a5",
CreatorAddress: "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz",
Salt: "61",
Expand All @@ -1090,7 +1090,7 @@ func TestQueryBuildAddress(t *testing.T) {
q := Querier(keeper)
for msg, spec := range specs {
t.Run(msg, func(t *testing.T) {
got, gotErr := q.BuildAddress(ctx, spec.srcQuery)
got, gotErr := q.BuildAddress(ctx, spec.src)
if spec.expErr != nil {
require.Error(t, gotErr)
assert.ErrorContains(t, gotErr, spec.expErr.Error())
Expand Down

0 comments on commit e405904

Please # to comment.