test(lockup): add test of unlocking schedule with termination#191
test(lockup): add test of unlocking schedule with termination#191telezhnaya wants to merge 4 commits intolockup-v2.0.0-branchfrom
Conversation
7320741 to
e5e1321
Compare
e5e1321 to
ad2028e
Compare
Hmm, how is it based on v2 if the code is from the master branch? I suggest we create lockup-v2 branch that corresponds to Also, we need the same test on master (lockup v3), so we can at least demonstrate how the behavior is different between the versions. |
| assert_eq!( | ||
| contract.get_locked_amount().0, | ||
| unvested_amount_at_termination_day | ||
| ); |
There was a problem hiding this comment.
Please, add assert on get_unlocked() == initial lockup amount - terminated
There was a problem hiding this comment.
Sorry, I will not add this check because both possible methods are broken
#192 (comment)
I guess they will work for this specific case, but anyway, I don't want to use them, that's a matter of coincidence that they give us the expected result here
P.S. It's still too early to review this; I will ping you separately when I finish the work here
There was a problem hiding this comment.
As per our last discussion, let's add this assert anyway, and if it crashes (supposedly in the next test), let's comment it out and leave an explanation why we believe it is not critical
5dd63e2 to
f8dfb76
Compare
|
We discussed some ideas on how to improve these tests. One of the ideas was to make the same tests on the master branch. This PR is ready to review. |
|
Actually, I'm not sure whether we need these tests on master at all. I hope no one will use this contract right now; it means that we can stop spending time on it and invest it in other issues. |
|
Created the test for v3.0.0 |


Warn: it should never be merged, it's based on v2 of lockup contract
The reason of this code is to test the lockup functionality that is used most widely nowadays. We want to be sure how current lockups work