cosmos-sdk/x/staking/types
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
..
codec.go rename RegisterCodec to RegisterLegacyAminoCodec (#7243) 2020-09-07 14:47:12 +00:00
commission.go Exclude proto files from format (#5706) 2020-02-27 07:53:22 -03:00
commission_test.go Merge PR: #3918 Allow Unrated Decreases to Validator Commission Rates 2019-03-19 22:04:25 -04:00
data_test.go Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
delegation.go Use enum instead of int32 for BondStatus (#7499) 2020-10-12 13:56:02 +00:00
delegation_test.go Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
errors.go Merge PR #5665: Bump Module ABCI Error Codes 2020-02-18 14:43:00 +01:00
events.go Merge PR #5102: Make events const and alias them (if internal) 2019-09-25 09:17:02 -07:00
expected_keepers.go Use enum instead of int32 for BondStatus (#7499) 2020-10-12 13:56:02 +00:00
exported.go Use enum instead of int32 for BondStatus (#7499) 2020-10-12 13:56:02 +00:00
genesis.go Enable proto JSON generally and remove HybridCodec (#6859) 2020-08-13 13:20:02 +00:00
genesis.pb.go Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
historical_info.go tendermint: update to rc3 (#6892) 2020-08-14 13:58:53 -04:00
historical_info_test.go tendermint: update to rc3 (#6892) 2020-08-14 13:58:53 -04:00
hooks.go various linter fixes (#6106) 2020-05-02 21:26:59 +02:00
keys.go Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
keys_test.go Migrate BaseAccount PubKey to use Any (#7268) 2020-09-25 08:41:16 +00:00
msg.go Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
msg_test.go Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
params.go Rename *codec.Codec to *codec.LegacyAmino (#6991) 2020-08-10 19:41:21 +00:00
params_test.go Rename stake/ to staking/ (#3280) 2019-01-11 12:08:01 -08:00
pool.go x/staking: gRPC query Service (#6490) 2020-07-14 17:41:30 +00:00
querier.go x/staking: gRPC query Service (#6490) 2020-07-14 17:41:30 +00:00
query.pb.go Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
query.pb.gw.go Change `address` from bytes to bech32 strings (#7242) 2020-09-25 10:25:37 +00:00
staking.pb.go [x/slashing] Implement Protobuf Msg Services (#7557) 2020-10-15 14:38:15 +00:00
tx.pb.go Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
validator.go Use enum instead of int32 for BondStatus (#7499) 2020-10-12 13:56:02 +00:00
validator_test.go Use enum instead of int32 for BondStatus (#7499) 2020-10-12 13:56:02 +00:00