fix broken mock test
This commit is contained in:
parent
0469358286
commit
889551dbbd
@ -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"`
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
//nolint
|
||||
package mock
|
||||
|
||||
import (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user