update glide

This commit is contained in:
Ethan Buchman
2016-11-22 21:28:57 -05:00
parent 5046d5b181
commit 64c7a0ad0d
2 changed files with 18 additions and 12 deletions

View File

@ -5,13 +5,14 @@ import (
crand "crypto/rand"
"fmt"
"math/rand"
"strings"
"testing"
"time"
. "github.com/tendermint/go-common"
"github.com/tendermint/go-wire"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/types"
"github.com/tendermint/tmsp/example/dummy"
tmsp "github.com/tendermint/tmsp/types"
)
@ -156,9 +157,14 @@ func testTMSPQuery(t *testing.T, statusI interface{}, value []byte) {
if query.Result.IsErr() {
panic(Fmt("Query returned an err: %v", query))
}
qResult := new(dummy.QueryResult)
if err := wire.ReadJSONBytes(query.Result.Data, qResult); err != nil {
t.Fatal(err)
}
// XXX: specific to value returned by the dummy
if !strings.Contains(string(query.Result.Data), "exists=true") {
panic(Fmt("Query error. Expected to find 'exists=true'. Got: %s", query.Result.Data))
if qResult.Exists != true {
panic(Fmt("Query error. Expected to find 'exists=true'. Got: %v", qResult))
}
}