Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add unit tests for module simulations #5007

Closed
8 tasks
fedekunze opened this issue Sep 6, 2019 · 6 comments
Closed
8 tasks

add unit tests for module simulations #5007

fedekunze opened this issue Sep 6, 2019 · 6 comments

Comments

@fedekunze
Copy link
Collaborator

fedekunze commented Sep 6, 2019

Summary

Add unit tests to each module simulation package.

Problem Definition

Now that the simulation type decoders (#4847), gen state and params (#4838), and operations and registered proposals (WIP #4869) are modularized we can add unit tests to each of those components.

This is a critical part of the software and should have ideally a 100% coverage.

Proposal

In terms of priorities, from highest to lowest, the files that need unit tests are:

all decoders (x/<module>/simulation/decoder.go) should be tested already.

cc: @tnachen


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@githubsands
Copy link

working on this

@dauTT
Copy link
Contributor

dauTT commented Jul 3, 2020

Hi, can I work on this?

@tac0turtle
Copy link
Member

Hi, can I work on this?

pleasee do!! thank you for all your recent contributions!!

@dauTT
Copy link
Contributor

dauTT commented Jul 10, 2020

I will track the progress of this task here:

module status PR
x/auth/simulation/operations.go closed no needed
x/auth/simulation/genesis.go closed #6775
x/auth/simulation/params.go closed #6774
x/auth/simulation/proposals.go closed no needed
x/bank/simulation/operations.go closed #6771
x/bank/simulation/genesis.go closed #6772
x/bank/simulation/params.go closed #6773
x/bank/simulation/proposals.go open no needed
x/capability/simulation/operations.go closed no needed
x/capability/simulation/genesis.go closed #6770
x/capability/simulation/params.go closed no needed
x/capability/simulation/proposals.go closed no needed
x/crisis/simulation/operations.go closed no needed
x/crisis/simulation/genesis.go closed no needed
x/crisis/simulation/params.go closed no needed
x/crisis/simulation/proposals.go closed no needed
x/distribution/simulation/operations.go closed #6764
x/distribution/simulation/genesis.go closed #6769
x/distribution/simulation/params.go closed #6768
x/distribution/simulation/proposals.go closed #6767
x/evidence/simulation/operations.go closed no needed
x/evidence/simulation/genesis.go closed #6740
x/evidence/simulation/params.go closed no needed
x/evidence/simulation/proposals.go closed no needed
x/genaccounts/simulation/operations.go closed no needed
x/genaccounts/simulation/genesis.go closed no needed
x/genaccounts/simulation/params.go closed no needed
x/genaccounts/simulation/proposals.go closed no needed
x/genutil/simulation/operations.go closed no needed
x/genutil/simulation/genesis.go closed no needed
x/genutil/simulation/params.go closed no needed
x/genutil/simulation/proposals.go closed no needed
x/gov/simulation/operations.go closed #6723
x/gov/simulation/genesis.go closed #6739
x/gov/simulation/params.go closed #6738
x/gov/simulation/proposals.go closed #6737
x/ibc/simulation/operations.go closed no needed
x/ibc/simulation/genesis.go closed #6712
x/ibc/simulation/params.go closed no needed
x/ibc/simulation/proposals.go closed no needed
x/ibc-transfer/simulation/operations.go closed no needed
x/ibc-transfer/simulation/genesis.go closed #6709
x/ibc-transfer/simulation/params.go closed no needed
x/ibc-transfer/simulation/proposals.go closed no needed
x/mint/simulation/operations.go closed no needed
x/mint/simulation/genesis.go closed #6706
x/mint/simulation/params.go closed #6708
x/mint/simulation/proposals.go closed no needed
x/params/simulation/operations.go closed #6699
x/params/simulation/genesis.go closed no needed
x/params/simulation/params.go closed no needed
x/params/simulation/proposals.go closed #6705
x/slashing /simulation/operations.go closed #6695
x/slashing /simulation/genesis.go closed #6696
x/slashing /simulation/params.go closed #6698
x/slashing /simulation/proposals.go closed no needed
x/staking/simulation/operations.go closed #6690
x/staking/simulation/genesis.go closed #6692
x/staking/simulation/params.go closed #6693
x/staking/simulation/proposals.go closed no needed
x/upgrade/simulation/operations.go closed no needed
x/upgrade/simulation/genesis.go closed no needed
x/upgrade/simulation/params.go closed no needed
x/upgrade/simulation/proposals.go closed no needed

@dauTT
Copy link
Contributor

dauTT commented Jul 12, 2020

Note to self: After adding all the test cases remember

to rename following files

  1. x/staking/simulation/operation_test.go => x/staking/simulation/operations_test.go
  2. x/slashing/simulation/operation_test.go => x/slashing/simulation/operations_test.go

to clean up following files from duplicate assertions:

  1. x/mint/simulation/genesis.go

remove print statements:

  1. x/gov/simulation/operations.go

@dauTT
Copy link
Contributor

dauTT commented Jul 22, 2020

I believe this task can be closed unless someone else wants to add more test cases. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants