-
Notifications
You must be signed in to change notification settings - Fork 108
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 NFT acceptance tests #2284
Add NFT acceptance tests #2284
Conversation
Signed-off-by: Ian Jungmann <ian.jungmann@hedera.com>
Signed-off-by: Ian Jungmann <ian.jungmann@hedera.com>
Codecov Report
@@ Coverage Diff @@
## main #2284 +/- ##
============================================
+ Coverage 83.48% 83.53% +0.04%
- Complexity 2234 2235 +1
============================================
Files 437 437
Lines 11998 11998
Branches 1002 1001 -1
============================================
+ Hits 10017 10022 +5
+ Misses 1653 1652 -1
+ Partials 328 324 -4
Continue to review full report at Codecov.
|
...mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/MirrorNodeClient.java
Outdated
Show resolved
Hide resolved
.setTreasuryAccountId(treasuryAccount.getAccountId()) | ||
.setTransactionMemo(memo); | ||
|
||
if (tokenType == TokenType.FUNGIBLE_COMMON) { | ||
tokenCreateTransaction.setDecimals(10).setInitialSupply(initialSupply); |
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.
Multi-line
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.
Should you also be setting TokenSupplyType
to FINITE
?
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.
Not necessarily, both FUNGIBLE and NON_FUNGIBLE can be either INFINITE or FINITE. You bring up a good point that we should probably test both cases though, I just have it default everything to INFINITE for simplicity, but for completeness it would be good to ensure we can handle both. I'm about to push a test to add that check.
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.
Added checks for that test.
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
...a-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/ScheduleFeature.java
Outdated
Show resolved
Hide resolved
...a-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/ScheduleFeature.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
| 200 | | ||
|
||
@acceptance @nft | ||
Scenario Outline: Validate Update Treasury NFT Flow - Create, Associate, Mint, Update Treasury |
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.
This test is temporarily a negative path test until services enables treasury updates for NFTs, not sure if we want to leave it so that we'll know to update it after or just remove it since we don't want to do a lot of negative path testing in here.
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.
We should not have negative tests as we're not testing HAPI. We're testing transactions that flow through to the mirror node.
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.
Looking good on 1st pass, some suggestions.
I see you have some of your own comments to will swing back after those commits
.setTreasuryAccountId(treasuryAccount.getAccountId()) | ||
.setTransactionMemo(memo); | ||
|
||
if (tokenType == TokenType.FUNGIBLE_COMMON) { | ||
tokenCreateTransaction.setDecimals(10).setInitialSupply(initialSupply); |
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.
Should you also be setting TokenSupplyType
to FINITE
?
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
...mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/MirrorNodeClient.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/TokenFeature.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ian Jungmann <ian.jungmann@hedera.com>
Signed-off-by: Ian Jungmann <ian.jungmann@hedera.com>
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.
Looks good, some suggestions on TokenClient methods
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ian Jungmann <ian.jungmann@hedera.com>
Signed-off-by: Ian Jungmann <ian.jungmann@hedera.com>
SonarCloud Quality Gate failed. |
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.
LGTM
Signed-off-by: Ian Jungmann ian.jungmann@hedera.com
Add NFT acceptance tests
Related issue(s):
Fixes #2134
Checklist