Tests - operation in Hive - account update operation
Operations:
account_update_operation, // 10
Configuration:
based on: https://gitlab.syncad.com/hive/hive/-/blob/develop/libraries/protocol/include/hive/protocol/config.hpp
#define HIVE_OWNER_UPDATE_LIMIT fc::minutes(60)
Test cases (owner)
-
1. User updates {owner} using owner authority.
Steps:
Step 1:
User updates {owner} using owner authority.
Expected results:
- After operation: The owner authority is updated.
- After operation: RC is reduced.
Test cases (owner)
-
2. User tries to update {owner} using active authority. -
3. User tries to update {owner} using posting authority.
Steps:
Step 1:
User tries to update {owner} using active/posting authority.
Expected results:
- After operation: The owner authority is not updated.
- After operation: RC is not reduced.
- After operation: The error occurs.
Test cases (active)
-
4. User updates {active} using owner authority. -
5. User updates {active} using active authority.
Steps:
Step 1:
User updates {active} using owner/active authority.
Expected results:
- After operation: The active authority is updated.
- After operation: RC is reduced.
Test cases (active)
-
6. User tries to update {active} using posting authority.
Steps:
Step 1:
User tries to update {active} using posting authority.
Expected results:
- After operation: The active authority is not updated.
- After operation: RC is not reduced.
- After operation: The error occurs.
Test cases (posting)
-
7. User updates {posting} using owner authority. -
8. User updates {posting} using active authority.
Steps:
Step 1:
User updates {posting} using owner/active authority.
Expected results:
- After operation: The posting authority is updated.
- After operation: RC is reduced.
Test cases (posting)
-
9. User updates {posting} using posting authority.
Steps:
Step 1:
User tries to update {posting} using posting authority.
Expected results:
- After operation: The posting authority is not updated.
- After operation: RC is not reduced.
- After operation: The error occurs.
Test cases (memo_key)
-
10. User updates {memo_key} using owner authority. -
11. User updates {memo_key} using active authority.
Steps:
Step 1:
User updates {memo_key} using owner/active authority.
Expected results:
- After operation: The memo_key authority is updated.
- After operation: RC is reduced.
Test cases (memo_key)
-
12. User tries to update {memo_key} using posting authority.
Steps:
Step 1:
User tries to update {memo_key} using posting authority.
Expected results:
- After operation: The memo_key is not updated.
- After operation: RC is not reduced.
- After operation: The error occurs.
Test cases (json_metadata)
-
13. User updates {json_metadata} using owner authority. -
14. User updates {json_metadata} using active authority.
Steps:
Step 1:
User updates {json_metadata} using owner/active authority.
Expected results:
- After operation: The json_metadata is updated.
- After operation: RC is reduced.
Test cases (json_metadata)
-
15. User tries to update {json_metadata} using posting authority.
Steps:
Step 1:
User tries to update {json_metadata} using posting authority.
Expected results:
- After operation: The json_metadata is not updated.
- After operation: RC is not reduced.
- After operation: The error occurs.
Test cases (all parameters with owner authority)
-
16. User updates {owner}, {active}, {posting}, {memo_key}, {json_metadata} using owner authority.
Steps:
Step 1:
User updates {owner}, {active}, {posting}, {memo_key}, {json_metadata} using owner authority.
Expected results:
- After operation: The owner authority is updated.
- After operation: The active authority is updated.
- After operation: The posting authority is updated.
- After operation: The memo_key is updated.
- After operation: The json_metadata is updated.
- After operation: RC is reduced.
Test cases (all parameters with active authority)
-
17. User updates {active}, {posting}, {memo_key}, {json_metadata} using active authority.
Steps:
Step 1:
User updates {active}, {posting}, {memo_key}, {json_metadata} using active authority.
Expected results:
- After operation: The active authority is updated.
- After operation: The posting authority is updated.
- After operation: The memo_key is updated.
- After operation: The json_metadata is updated.
- After operation: RC is reduced.
Test cases
-
18. User updates the owner authority two times per HIVE_OWNER_UPDATE_LIMIT (mainnet 1 hour).
Steps:
Step 1:
User updates {owner} using owner authority.
Expected results:
- After operation: The owner authority is updated.
- After operation: RC is reduced.
Step 2:
User updates {owner} using owner authority - less than HIVE_OWNER_UPDATE_LIMIT (mainnet 1 hour) passed from step 1.
Expected results:
- After operation: The owner authority is updated.
- After operation: RC is reduced.
Test cases
-
19. User tries to update the owner authority three times per HIVE_OWNER_UPDATE_LIMIT (mainnet 1 hour).
Steps:
Step 1:
User updates {owner} using owner authority.
Expected results:
- After operation: The owner authority is updated.
- After operation: RC is reduced.
Step 2:
User updates {owner} using owner authority - less than HIVE_OWNER_UPDATE_LIMIT (mainnet 1 hour) passed from step 1.
Expected results:
- After operation: The owner authority is updated.
- After operation: RC is reduced.
Step 3:
User tries to update {owner} using owner authority - less than HIVE_OWNER_UPDATE_LIMIT (mainnet 1 hour) passed from step 1.
Expected results:
- After operation: The owner authority is not updated.
- After operation: RC is not reduced.
- After operation: The error occurs.