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 - NFT #9529

Closed
Tracked by #8081
nickeynikolovv opened this issue Oct 7, 2024 · 0 comments · Fixed by #9540
Closed
Tracked by #8081

HIP-904 Add Acceptance tests for Token Airdrops - NFT #9529

nickeynikolovv opened this issue Oct 7, 2024 · 0 comments · Fixed by #9540
Assignees
Labels
enhancement Type: New feature test Test infrastructure, automated tests required, etc
Milestone

Comments

@nickeynikolovv
Copy link
Contributor

nickeynikolovv commented Oct 7, 2024

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

@nickeynikolovv nickeynikolovv added enhancement Type: New feature test Test infrastructure, automated tests required, etc labels Oct 7, 2024
@nickeynikolovv nickeynikolovv self-assigned this Oct 7, 2024
@nickeynikolovv nickeynikolovv added this to the 0.116.0 milestone Oct 7, 2024
@nickeynikolovv nickeynikolovv changed the title HIP-904 Add Acceptance tests for Token Airdrops - Fungible tokens HIP-904 Add Acceptance tests for Token Airdrops - NFT Oct 7, 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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant