cosmos-sdk/x/slashing/client/cli/cli_test.go
Marko 54ed8d7a2c
lint: official action (#6156)
* switch from review dog to official golangci action

* fix release

* disable nolintlint and wsl

* fix linting issues

* have name adhere to required

* add timeout

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-07 09:40:49 +00:00

34 lines
796 B
Go

// +build cli_test
package cli_test
import (
"testing"
"github.com/stretchr/testify/require"
cli "github.com/cosmos/cosmos-sdk/tests/cli"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/slashing/client/testutil"
)
func TestCLISlashingGetParams(t *testing.T) {
t.Parallel()
f := cli.InitFixtures(t)
// start simd server
proc := f.SDStart()
t.Cleanup(func() { proc.Stop(false) })
params := testutil.QuerySlashingParams(f)
require.Equal(t, int64(100), params.SignedBlocksWindow)
require.Equal(t, sdk.NewDecWithPrec(5, 1), params.MinSignedPerWindow)
sinfo := testutil.QuerySigningInfo(f, f.SDTendermint("show-validator"))
require.Equal(t, int64(0), sinfo.StartHeight)
require.False(t, sinfo.Tombstoned)
// Cleanup testing directories
f.Cleanup()
}