Review feedback
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user