-
Notifications
You must be signed in to change notification settings - Fork 63
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 HTS Precompile Acceptance Tests for Expiry Info methods #467
Add HTS Precompile Acceptance Tests for Expiry Info methods #467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG.
Layout suggestion.
Once addressed please move this to a draft PR.
I'd prefer to not check in turned of tests so we don't forget but rather just hold off till we get the 0.30.0 services tag next sprint.
const tokenExpiryInfo = (await getTokenExpiryInfoTx.wait()).events.filter(e => e.event === 'TokenExpiryInfo')[0].args.expiryInfo; | ||
|
||
expect(responseCode).to.equal(TX_SUCCESS_CODE); | ||
expect(tokenExpiryInfo.autoRenewPeriod).to.equal(7776000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add check for second
also here and below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
expect(tokenExpiryInfo.autoRenewAccount).to.equal(NftHTSTokenContractAddress); | ||
}); | ||
|
||
it('should be able to update fungible token expiry info', async function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improvement suggestion.
Change these 4 tests into 2 tests
Test 1 ( combines your current test 1 and 3)
- confirm
getTokenExpiryInfoPublic()
for FT - update expiry info using
updateTokenExpiryInfoPublic()
- confirm updated info
Test 2 ( combines your current test 2 and 4)
- confirm
getTokenExpiryInfoPublic()
for NFT - update expiry info using
updateTokenExpiryInfoPublic()
- confirm updated info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Updated the flow.
Moving this PR to draft, until we get the 0.30.0 services tag next sprint. |
Codecov Report
@@ Coverage Diff @@
## main #467 +/- ##
=======================================
Coverage 76.38% 76.38%
=======================================
Files 12 12
Lines 923 923
Branches 144 144
=======================================
Hits 705 705
Misses 165 165
Partials 53 53 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
7f14fc3
to
0aa1909
Compare
Signed-off-by: georgi-l95 <glazarov95@gmail.com> update flow Signed-off-by: georgi-l95 <glazarov95@gmail.com> Enable tests Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com> test refactor Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> Acceptance test index rework Signed-off-by: georgi-l95 <glazarov95@gmail.com> remove typo Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com>
e5b1e86
to
bbd6115
Compare
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
Please open a ticket to track us coming back and removing this workaround.
Thanks
* add tests for expiryInfo Signed-off-by: georgi-l95 <glazarov95@gmail.com> update flow Signed-off-by: georgi-l95 <glazarov95@gmail.com> Enable tests Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com> test refactor Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> Acceptance test index rework Signed-off-by: georgi-l95 <glazarov95@gmail.com> remove typo Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> * change Signed-off-by: georgi-l95 <glazarov95@gmail.com> * bump services version and activate some tests Signed-off-by: georgi-l95 <glazarov95@gmail.com> * revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> Signed-off-by: georgi-l95 <glazarov95@gmail.com> Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
* add tests for expiryInfo Signed-off-by: georgi-l95 <glazarov95@gmail.com> update flow Signed-off-by: georgi-l95 <glazarov95@gmail.com> Enable tests Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com> test refactor Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> Acceptance test index rework Signed-off-by: georgi-l95 <glazarov95@gmail.com> remove typo Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> * change Signed-off-by: georgi-l95 <glazarov95@gmail.com> * bump services version and activate some tests Signed-off-by: georgi-l95 <glazarov95@gmail.com> * revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> Signed-off-by: georgi-l95 <glazarov95@gmail.com> Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
* add tests for expiryInfo Signed-off-by: georgi-l95 <glazarov95@gmail.com> update flow Signed-off-by: georgi-l95 <glazarov95@gmail.com> Enable tests Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com> test refactor Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> Acceptance test index rework Signed-off-by: georgi-l95 <glazarov95@gmail.com> remove typo Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> test Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> x Signed-off-by: georgi-l95 <glazarov95@gmail.com> * change Signed-off-by: georgi-l95 <glazarov95@gmail.com> * bump services version and activate some tests Signed-off-by: georgi-l95 <glazarov95@gmail.com> * revert some changes Signed-off-by: georgi-l95 <glazarov95@gmail.com> Signed-off-by: georgi-l95 <glazarov95@gmail.com>
Signed-off-by: georgi-l95 glazarov95@gmail.com
Description:
Adds tests for:
getTokenExpiryInfo(address)
updateTokenExpiryInfo(address, Expiry)
Related issue(s):
Fixes #408
Notes for reviewer:
Version of network node is bumped to 0.30.0-alpha.2 . Some adjustments before starting the node, so that acceptance tests can run. This unblocks all other PRs open for HTS Precompile tests.
Checklist