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

piwww: Add RFP process to testrun command. #1240

Merged
merged 22 commits into from
Jul 21, 2020
Merged

Conversation

amass01
Copy link
Member

@amass01 amass01 commented Jul 5, 2020

This diff adds the RFP process to piwww testrun command.

It covers the following commands:

  • Create RFP
  • Make RFP public
  • Authorize it for vote
  • Start vote on RFP
  • Cast RFP votes
  • Wait until RFP votes is done
  • Create 4 RFP submissions:
    • 1 Unreviewed
    • 2 Public
    • 1 Abandoned
  • Start runoff vote
  • Cast first public submission votes
  • Wait until runoff vote is done
  • Ensure first submission was approved.

And the following failures/edge cases as @lukebp suggested:

  • Attempting to submit an RFP submission before the RFP vote has been approved.
  • Submit an RFP, have the vote fail, attempt to submit an RFP submission to failed rfp.
  • Attempting to vote on the abandoned proposal submission during runoff vote.

Closes #1190

@amass01 amass01 marked this pull request as ready for review July 5, 2020 22:24
@amass01
Copy link
Member Author

amass01 commented Jul 6, 2020

Log:

Running RFP routes
  Login admin
  Update user key
  Create RFP
  RFP submitted: 50d4bc451fa74f9a5470739f9578fa053e5c158af081db09a3967e6a0e3d3ef9
  Set RFP status: not reviewed to public
  Authorize vote: authorize
  Start RFP vote
  Cast RFP votes
Enter the private passphrase of your wallet: 
  RFP voting still going on...
  RFP voting still going on...
  RFP approved successfully
  Create unreviewed RFP submission
  Create 2 more submissions & make them public
  Set first submission status: not reviewed to public
  Set second submission status: not reviewed to public
  Set third submission status: not reviewed to abandoned
  Start RFP submissions runoff vote
  Cast first submission votes
Enter the private passphrase of your wallet: 
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  Runoff vote still going on...
  First submission approved successfully
  Logout
Running websocket routes
...

@lukebp
Copy link
Member

lukebp commented Jul 6, 2020

Can we test some of the failure and edge cases as well. Things like:

  • Attempting to submit an rfp submission before the rfp vote has been approved.
  • Submit an rfp, have the vote fail, attempt to submit an rfp submission to failed rfp.
  • Attempting to vote on the abandoned proposal submission during runoff vote.

We don't need to get too in-depth with it, that's what the unit tests are for, but testing some of the basic stuff would be a helpful sanity check.

@amass01
Copy link
Member Author

amass01 commented Jul 6, 2020

That's a good idea, will add all these cases.

politeiawww/cmd/piwww/testrun.go Outdated Show resolved Hide resolved
politeiawww/cmd/piwww/testrun.go Outdated Show resolved Hide resolved
politeiawww/cmd/piwww/testrun.go Outdated Show resolved Hide resolved
politeiawww/cmd/piwww/testrun.go Outdated Show resolved Hide resolved
politeiawww/cmd/piwww/testrun.go Outdated Show resolved Hide resolved
@amass01
Copy link
Member Author

amass01 commented Jul 7, 2020

@lukebp Added all suggested test cases.

Copy link
Member

@lukebp lukebp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@lukebp lukebp merged commit 231bd32 into decred:master Jul 21, 2020
@amass01 amass01 deleted the rfpTestrun branch March 28, 2021 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

piwww: Add rfp process to testrun command.
2 participants