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
-35
View File
@@ -1,35 +0,0 @@
package testutil
import (
"fmt"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/tests"
"github.com/cosmos/cosmos-sdk/tests/cli"
"github.com/cosmos/cosmos-sdk/x/slashing/types"
)
// QuerySigningInfo returns the signing info for a validator
func QuerySigningInfo(f *cli.Fixtures, val string) types.ValidatorSigningInfo {
cmd := fmt.Sprintf("%s query slashing signing-info %s %s", f.SimdBinary, val, f.Flags())
res, errStr := tests.ExecuteT(f.T, cmd, "")
require.Empty(f.T, errStr)
var sinfo types.ValidatorSigningInfo
err := f.Cdc.UnmarshalJSON([]byte(res), &sinfo)
require.NoError(f.T, err)
return sinfo
}
// QuerySlashingParams returns query slashing params
func QuerySlashingParams(f *cli.Fixtures) types.Params {
cmd := fmt.Sprintf("%s query slashing params %s", f.SimdBinary, f.Flags())
res, errStr := tests.ExecuteT(f.T, cmd, "")
require.Empty(f.T, errStr)
var params types.Params
err := f.Cdc.UnmarshalJSON([]byte(res), &params)
require.NoError(f.T, err)
return params
}