cosmos-sdk/simapp
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
..
helpers Put AccountSequence in SignerInfo (#6997) 2020-08-21 14:20:47 +00:00
params Robert/move amino stdtx (#7301) 2020-09-22 14:35:18 +00:00
simd Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
app_test.go Add height in exported genesis (#7089) 2020-09-03 10:11:46 +00:00
app.go Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
config.go Remove dependency of types/module package on x/simulation (#5835) 2020-03-23 12:55:44 +01:00
encoding.go rename RegisterCodec to RegisterLegacyAminoCodec (#7243) 2020-09-07 14:47:12 +00:00
export.go Use enum instead of int32 for BondStatus (#7499) 2020-10-12 13:56:02 +00:00
genesis_account_test.go Update tm pubkey references (#7102) 2020-08-28 16:02:38 +00:00
genesis_account.go x/auth: remove alias.go usage (#6440) 2020-06-17 14:42:27 -04:00
genesis.go Enable proto JSON for genesis (#7000) 2020-08-11 14:22:30 +00:00
sim_bench_test.go fix hardcoded auth sims (#7135) 2020-08-24 10:55:42 +00:00
sim_test.go ibc: core restructure (#7434) 2020-10-02 06:03:02 -03:00
state.go Update tm pubkey references (#7102) 2020-08-28 16:02:38 +00:00
test_helpers.go tendermint: update sdk to rc5 (#7527) 2020-10-14 06:20:52 +00:00
types.go Add height in exported genesis (#7089) 2020-09-03 10:11:46 +00:00
utils_test.go rename RegisterCodec to RegisterLegacyAminoCodec (#7243) 2020-09-07 14:47:12 +00:00
utils.go Add height in exported genesis (#7089) 2020-09-03 10:11:46 +00:00