Update to go-cosmwasm v0.11.0-rc and raw query tests pass

This commit is contained in:
Ethan Frey 2020-10-07 16:50:20 +02:00
parent 09d547620b
commit 569539c0ff
4 changed files with 5 additions and 5 deletions

2
go.mod
View File

@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
go 1.14
require (
github.com/CosmWasm/go-cosmwasm v0.11.0-alpha2
github.com/CosmWasm/go-cosmwasm v0.11.0-rc
github.com/cosmos/cosmos-sdk v0.39.1-0.20200727135228-9d00f712e334
github.com/golang/mock v1.4.3 // indirect
github.com/google/gofuzz v1.0.0

2
go.sum
View File

@ -15,6 +15,8 @@ github.com/CosmWasm/go-cosmwasm v0.11.0-alpha1 h1:5c87JcnA+ncQlSJO/mEK6z9oIi/oS4
github.com/CosmWasm/go-cosmwasm v0.11.0-alpha1/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc=
github.com/CosmWasm/go-cosmwasm v0.11.0-alpha2 h1:w42GtYC4P/6dXOVlqEutr96tSsy/EO0aC9d3sbkk5hs=
github.com/CosmWasm/go-cosmwasm v0.11.0-alpha2/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc=
github.com/CosmWasm/go-cosmwasm v0.11.0-rc h1:qKMUR/84LluMStwuOgaWxupQj8STmnRaxFgFXrhY95o=
github.com/CosmWasm/go-cosmwasm v0.11.0-rc/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=

View File

@ -135,12 +135,10 @@ func TestQueryContractState(t *testing.T) {
// if smart query, check custom response
if spec.srcPath[2] != QueryMethodContractStateAll {
fmt.Printf("path: %s\n", spec.srcPath[2])
require.Equal(t, spec.expRes, binResult)
return
}
fmt.Printf("all state: %s\n", spec.srcPath[2])
// otherwise, check returned models
var r []types.Model
if spec.expErr == nil {

View File

@ -425,8 +425,8 @@ func TestWasmRawQueryWithNil(t *testing.T) {
mustParse(t, res, &reflectRawRes)
// and make sure there is no data
require.Empty(t, reflectRawRes.Data)
// TODO: check between []byte{} and nil
require.Nil(t, reflectRawRes.Data)
// we get an empty byte slice not nil (if anyone care in go-land)
require.Equal(t, []byte{}, reflectRawRes.Data)
}
func checkAccount(t *testing.T, ctx sdk.Context, accKeeper auth.AccountKeeper, addr sdk.AccAddress, expected sdk.Coins) {