mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 17:51:39 +00:00
Clean up tests, remove panics
This commit is contained in:
@ -5,20 +5,16 @@ import (
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tendermint/rpc/grpc"
|
||||
)
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
func TestBroadcastTx(t *testing.T) {
|
||||
require := require.New(t)
|
||||
res, err := GetGRPCClient().BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{[]byte("this is a tx")})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if res.CheckTx.Code != 0 {
|
||||
t.Fatalf("Non-zero check tx code: %d", res.CheckTx.Code)
|
||||
}
|
||||
if res.DeliverTx.Code != 0 {
|
||||
t.Fatalf("Non-zero append tx code: %d", res.DeliverTx.Code)
|
||||
}
|
||||
require.Nil(err)
|
||||
require.EqualValues(0, res.CheckTx.Code)
|
||||
require.EqualValues(0, res.DeliverTx.Code)
|
||||
}
|
||||
|
Reference in New Issue
Block a user