cosmos-sdk/x/gov
Robert Zaremba 8eaf2ececc
Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526)
* testing: refactore Validation and Delegation handling of x/staking

This Changeset introduces set of improvements for writing tests.

The idea is to create a testing subpackage which will provide functions
to make tests more dev-friendly and wrap higher level use-cases.
Here is a show-up of of creating a service for staking module
for tests.

This PR also changes the `x/staking/types.MsgCreateValidator.Pubkey` from string
to types.Any. This change motivated the other change to show the pattern I'm describing here.

* add validator checks

* type change fixes

* use deprecated

* adding test slashing

* new network comment update

* working on tests

* Fix TestMsgPkDecode test

* Add UnpackInterfaces to MsgCreateValidator

* Fix tests

* Convert bech32 pubkey to proto

* Fix test

* fix v039/migrate_test/TestMigrate

* fix tests

* testslashing: rename Service to Helper

* file rename

* update TestMsgDecode

Co-authored-by: blushi <marie.gauthier63@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
2020-10-19 13:04:55 +00:00
..
client Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
keeper Refactor x/{gov, crisis} according to ADR 031 (#7533) 2020-10-16 13:04:02 +00:00
legacy CLI `migrate` command follow-up: decode & re-encode (#7464) 2020-10-09 19:09:43 +00:00
simulation Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
spec Merge PR #5604: docs: minor doc formatting & touchup of the scaffold section 2020-02-04 13:16:56 -05:00
types Refactor x/{gov, crisis} according to ADR 031 (#7533) 2020-10-16 13:04:02 +00:00
abci.go Proto Auditing: Replace ID with Id (#7032) 2020-08-14 08:55:54 +00:00
abci_test.go Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
common_test.go Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
genesis.go Proto Auditing: Replace ID with Id (#7032) 2020-08-14 08:55:54 +00:00
genesis_test.go tendermint: update to rc3 (#6892) 2020-08-14 13:58:53 -04:00
handler.go Refactor x/{gov, crisis} according to ADR 031 (#7533) 2020-10-16 13:04:02 +00:00
handler_test.go Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references (#7056) 2020-08-17 09:04:50 +00:00
module.go Refactor RegisterQueryServices -> RegisterServices (#7518) 2020-10-12 16:31:51 +00:00
module_test.go tendermint: update to rc3 (#6892) 2020-08-14 13:58:53 -04:00