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

HIP-904 Add Acceptance tests for Token Airdrops #8278

Open
Tracked by #8081
edwin-greene opened this issue May 10, 2024 · 0 comments
Open
Tracked by #8081

HIP-904 Add Acceptance tests for Token Airdrops #8278

edwin-greene opened this issue May 10, 2024 · 0 comments
Labels
enhancement Type: New feature test Test infrastructure, automated tests required, etc

Comments

@edwin-greene
Copy link
Contributor

Problem

Add acceptance tests for the token feature for token airdrops.

Solution

Use an existing set of accounts and a token_id from the existing acceptance tests and add new tests that perform the following:

  • Send two airdrops, a fungible and nft airdrop to an account that has been associated with the tokens and verify that the airdrops are transferred to the account and that the two REST APIs do not list the airdrops. Verify that related endpoints for the account (/accounts/{id}/nfts, /accounts/{id}/tokens, and /tokens/{id}/nfts/{serial}) show the account as the owner of the tokens.
  • Send a fungible and nft airdrop to an account that has not been associated with the tokens and has no open slots for automatic associations and verify that the airdrops are listed by the two REST APIs. Verify that related endpoints for the account (/accounts/{id}/nfts, /accounts/{id}/tokens, and /tokens/{id}/nfts/{serial}) do not show the account as the owner of the tokens.
  • Cancel the pending airdrops and verify that they are no longer listed by the two REST APIs. Verify that the receiver does not own the tokens and that the sender does own them (/accounts/{receiver/senderId}/nfts, /accounts/{receiver/senderId}/tokens, and /tokens/{receiver/senderId}/nfts/{serial}).
  • Send a fungible and nft airdrop to an account that has not been associated with the tokens and has no open slots for automatic associations and verify that the airdrop is listed in the two REST APIs. Verify that related endpoints for the account (/accounts/{id}/nfts, /accounts/{id}/tokens, and /tokens/{id}/nfts/{serial}) do not show the account as the owner of the tokens.
  • Claim the airdrops and verify that they are no longer listed in the two REST APIs. Verify that related endpoints for the account (/accounts/{id}/nfts, /accounts/{id}/tokens, and /tokens/{id}/nfts/{serial}) show the account as the owner of the tokens.
  • Reject the tokens that were just claimed and verify that related endpoints for the account (/accounts/{id}/nfts, /accounts/{id}/tokens and /tokens/{id}/nfts/{serial}) do not show the account as the owner of the tokens. Verify that the tokens have been returned to their treasury account (/accounts/{treasury account id}/nfts, /accounts/{treasury account id}/tokens, and /tokens/{id}/nfts/{serial}).

Alternatives

No response

@edwin-greene edwin-greene added enhancement Type: New feature test Test infrastructure, automated tests required, etc labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature test Test infrastructure, automated tests required, etc
Projects
None yet
Development

No branches or pull requests

1 participant