diff --git a/x/wasm/internal/keeper/proposal_integration_test.go b/x/wasm/internal/keeper/proposal_integration_test.go index 24a33af..ea889ce 100644 --- a/x/wasm/internal/keeper/proposal_integration_test.go +++ b/x/wasm/internal/keeper/proposal_integration_test.go @@ -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 diff --git a/x/wasm/internal/keeper/querier_test.go b/x/wasm/internal/keeper/querier_test.go index 6460b27..ea54a72 100644 --- a/x/wasm/internal/keeper/querier_test.go +++ b/x/wasm/internal/keeper/querier_test.go @@ -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, }, } diff --git a/x/wasm/internal/keeper/test_common.go b/x/wasm/internal/keeper/test_common.go index 24f9371..13fc586 100644 --- a/x/wasm/internal/keeper/test_common.go +++ b/x/wasm/internal/keeper/test_common.go @@ -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() }