diff --git a/mock/app.go b/mock/app.go index 0168e4c0425c..3e9a3ad5f567 100644 --- a/mock/app.go +++ b/mock/app.go @@ -70,11 +70,13 @@ func KVStoreHandler(storeKey sdk.StoreKey) sdk.Handler { } } +// basic KV structure type KV struct { Key string `json:"key"` Value string `json:"value"` } +// What Genesis JSON is formatted as type GenesisJSON struct { Values []KV `json:"values"` } diff --git a/mock/app_test.go b/mock/app_test.go index 2e4099d3b666..103530e5014c 100644 --- a/mock/app_test.go +++ b/mock/app_test.go @@ -25,16 +25,17 @@ func TestInitApp(t *testing.T) { require.NoError(t, err) req := abci.RequestInitChain{AppStateBytes: opts} app.InitChain(req) + app.Commit() // XXX test failing - // // make sure we can query these values - //query := abci.RequestQuery{ - //Path: "/main/key", - //Data: []byte("foo"), - //} - //qres := app.Query(query) - //require.Equal(t, uint32(0), qres.Code, qres.Log) - //assert.Equal(t, []byte("bar"), qres.Value) + // make sure we can query these values + query := abci.RequestQuery{ + Path: "/main/key", + Data: []byte("foo"), + } + qres := app.Query(query) + require.Equal(t, uint32(0), qres.Code, qres.Log) + assert.Equal(t, []byte("bar"), qres.Value) } // TextDeliverTx ensures we can write a tx diff --git a/mock/tx.go b/mock/tx.go index 970549d2cdee..a9adff5deed8 100644 --- a/mock/tx.go +++ b/mock/tx.go @@ -1,3 +1,4 @@ +//nolint package mock import (