Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Nov 17, 2020
1 parent 6a92085 commit 0589dfa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/proposal_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestStoreCodeProposal(t *testing.T) {
wasmCode, err := ioutil.ReadFile("./testdata/hackatom.wasm")
require.NoError(t, err)

myActorAddress := AnyAccAddress(t)
myActorAddress := RandomBech32AccountAddress(t)

src := types.StoreCodeProposalFixture(func(p *types.StoreCodeProposal) {
p.RunAs = myActorAddress
Expand Down
6 changes: 3 additions & 3 deletions x/wasm/internal/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestQueryAllContractState(t *testing.T) {
expModelContains: contractModel,
},
"query all with unknown address": {
srcQuery: &types.QueryAllContractStateRequest{Address: AnyAccAddress(t)},
srcQuery: &types.QueryAllContractStateRequest{Address: RandomBech32AccountAddress(t)},
expErr: types.ErrNotFound,
},
}
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestQuerySmartContractState(t *testing.T) {
expErr: types.ErrQueryFailed,
},
"query smart with unknown address": {
srcQuery: &types.QuerySmartContractStateRequest{Address: AnyAccAddress(t), QueryData: []byte(`{"verifier":{}}`)},
srcQuery: &types.QuerySmartContractStateRequest{Address: RandomBech32AccountAddress(t), QueryData: []byte(`{"verifier":{}}`)},
expErr: types.ErrNotFound,
},
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func TestQueryRawContractState(t *testing.T) {
expData: nil,
},
"query raw with unknown address": {
srcQuery: &types.QueryRawContractStateRequest{Address: AnyAccAddress(t), QueryData: []byte("foo")},
srcQuery: &types.QueryRawContractStateRequest{Address: RandomBech32AccountAddress(t), QueryData: []byte("foo")},
expErr: types.ErrNotFound,
},
}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func handleExecute(ctx sdk.Context, k *Keeper, msg *types.MsgExecuteContract) (*
return res, nil
}

func AnyAccAddress(_ *testing.T) string {
func RandomBech32AccountAddress(_ *testing.T) string {
_, _, addr := keyPubAddr()
return addr.String()
}
Expand Down

0 comments on commit 0589dfa

Please sign in to comment.