-
Notifications
You must be signed in to change notification settings - Fork 112
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
Acceptance tests for token allowance amounts #6592
Acceptance tests for token allowance amounts #6592
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #6592 +/- ##
============================================
+ Coverage 92.57% 92.70% +0.12%
+ Complexity 6503 6392 -111
============================================
Files 841 823 -18
Lines 27348 27079 -269
Branches 3126 3104 -22
============================================
- Hits 25318 25104 -214
+ Misses 1319 1270 -49
+ Partials 711 705 -6 ☔ View full report in Codecov by Sentry. |
886a05c
to
dc0ed60
Compare
hedera-mirror-test/src/test/resources/features/token/tokenAllowance.feature
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
...ra-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/props/MirrorTransfer.java
Show resolved
Hide resolved
...c/test/java/com/hedera/mirror/test/e2e/acceptance/response/MirrorTokenAllowanceResponse.java
Outdated
Show resolved
Hide resolved
...est/src/test/java/com/hedera/mirror/test/e2e/acceptance/props/MirrorTokenAccountBalance.java
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Show resolved
Hide resolved
hedera-mirror-test/src/test/resources/features/token/tokenAllowance.feature
Outdated
Show resolved
Hide resolved
hedera-mirror-test/src/test/resources/features/token/tokenAllowance.feature
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/resources/features/token/tokenAllowance.feature
Outdated
Show resolved
Hide resolved
...ra-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/AccountClient.java
Show resolved
Hide resolved
...ror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/props/MirrorTokenAllowance.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
…_NOT_HAVE_ALLOWANCE problem. Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
…scenario. Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
…e tokens and accounts to get feedback. Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
…wner transfer affecting allowance. Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
…ng with mirror node API. Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
If key is DER encoded, PrivateKey can figure out the algorithm. Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.com>
cd22331
to
7e2d6bf
Compare
hedera-mirror-test/src/test/resources/features/contract/call.feature
Outdated
Show resolved
Hide resolved
Signed-off-by: Jeff Schmidt <jeffrey.schmidt@swirldslabs.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.
LGTM
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
Collections.emptyList()); | ||
@Given("I ensure token {string} has been created") | ||
public void createNamedToken(String tokenName) { | ||
// If just now created, then ensure transaction has been seen by mirror node and receipt was available |
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 doesn't actually ensure that the transaction has been seen by mirror node, just consensus nodes, right? Does it need to to avoid race conditions?
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.
Oooh... Yes, this is only an interaction with the consensus nodes (HAPI). My comment is a lie! While that did appear to solve the issue, it could become problematic again.
When using the named token mechanism (TokenClient.getToken()
) the token may or may not be created. So there may or may not be a transaction. Instead, in this step, after calling getToken()
the mirror node API should be invoked to ensure the token exists (/api/v1/tokens?token.id=<tokenId>
) with the standard retry template retrying 404.
Does that make sense? I can create a new ticket and PR to address this.
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.
Can just ensure the transaction is present on 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.
Description:
With the implementation of #3576 completed, implement acceptance tests around the new functionality provided, namely crypto and token allowance definition and that approved crypto/fungible token transfers are properly reflected in the allowance balances.
Related issue(s):
Fixes #6553
Notes for reviewer:
Checklist