CLI/Tests: Remove Fixtures (#6799)

* remove fixtures

* setup tests

* update x/mint

* cli: update x/staking commands

* tests: convert x/staking CLI tests

* tests: fix x/auth CLI tests

* cli updates

* fix buiild

* fix build

* Update x/gov/client/cli/cli_test.go

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* remove GenerateOrBroadcastTx

* move TestCLIQueryConn

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
This commit is contained in:
Alexander Bezobchuk
2020-07-21 13:54:07 +00:00
committed by GitHub
co-authored by Amaury Martiny Federico Kunze
parent 6e7ce48b31
commit 0ccc48d2a3
38 changed files with 637 additions and 2025 deletions
+19 -6
View File
@@ -2,20 +2,20 @@ package client_test
import (
"bytes"
"context"
"os"
"testing"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil/network"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
)
func TestMain(m *testing.M) {
@@ -100,3 +100,16 @@ value:
x: "10"
`, string(buf.Bytes()))
}
func TestCLIQueryConn(t *testing.T) {
cfg := network.DefaultConfig()
cfg.NumValidators = 1
n := network.New(t, cfg)
defer n.Cleanup()
testClient := testdata.NewTestServiceClient(n.Validators[0].ClientCtx)
res, err := testClient.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"})
require.NoError(t, err)
require.Equal(t, "hello", res.Message)
}