cosmos-sdk/x/genutil
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 0.39->0.40 CLI `migrate` command (#6839) 2020-10-05 21:28:14 +00:00
legacy CLI `migrate` command follow-up: decode & re-encode (#7464) 2020-10-09 19:09:43 +00:00
types Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
collect.go x/genutil: fix CollectTxs traversal logic (#6913) 2020-10-08 11:22:39 +00:00
collect_test.go x/genutil: fix CollectTxs traversal logic (#6913) 2020-10-08 11:22:39 +00:00
doc.go
genesis.go
gentx.go
gentx_test.go Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
module.go rename RegisterCodec to RegisterLegacyAminoCodec (#7243) 2020-09-07 14:47:12 +00:00
utils.go types: tests -> test suites migration (#7400) 2020-09-28 12:46:49 +02:00
utils_test.go replace testutil.NewTestCaseDir() with Go1.15's T.TempDir() (#7014) 2020-09-18 12:08:24 +01:00