add page flags for staking validators (#8103)
* add page flags for staking validators * add test * fix test * add build flag Co-authored-by: aleem1413 <aleem@vitwit.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
c0f3039fc3
commit
e321317c20
@ -256,7 +256,10 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidators() {
|
||||
}{
|
||||
{
|
||||
"one validator case",
|
||||
[]string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)},
|
||||
[]string{
|
||||
fmt.Sprintf("--%s=json", tmcli.OutputFlag),
|
||||
fmt.Sprintf("--%s=1", flags.FlagLimit),
|
||||
},
|
||||
1,
|
||||
},
|
||||
{
|
||||
@ -278,7 +281,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidators() {
|
||||
|
||||
var result types.QueryValidatorsResponse
|
||||
s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &result))
|
||||
s.Require().Equal(len(s.network.Validators), len(result.Validators))
|
||||
s.Require().Equal(tc.minValidatorCount, len(result.Validators))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,6 +132,7 @@ $ %s query staking validators
|
||||
}
|
||||
|
||||
flags.AddQueryFlagsToCmd(cmd)
|
||||
flags.AddPaginationFlagsToCmd(cmd, "validators")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user