Skip to content
Snippets Groups Projects
Commit f1effea5 authored by Pawel Maniora's avatar Pawel Maniora
Browse files

new tests

parent bf807a8b
No related branches found
No related tags found
1 merge request!158hived tavern tests
Showing
with 197 additions and 28 deletions
---
test_name: Hived find_account_recovery_requests
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: find_account_recovery_requests
request:
url: "{service.url:s}"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_account_recovery_requests"
params: {"accounts":["gtg"]}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "empty"
directory: "database_api_patterns/find_account_recovery_requests"
{
"requests": [
{
"account_to_recover": "tulpa",
"expires": "2020-11-05T13:48:39",
"id": 9,
"new_owner_authority": {
"account_auths": [],
"key_auths": [
[
"STM6wxeXR9kg8uu7vX5LS4HBgKw8sdqHBpzAaacqPwPxYfRx9h5bS",
1
]
],
"weight_threshold": 1
}
}
]
}
...@@ -18,11 +18,12 @@ ...@@ -18,11 +18,12 @@
jsonrpc: "2.0" jsonrpc: "2.0"
id: 1 id: 1
method: "database_api.find_account_recovery_requests" method: "database_api.find_account_recovery_requests"
params: {"accounts":["hadrgames"]} params: {"accounts":["tulpa"]}
response: response:
status_code: 200 status_code: 200
verify_response_with: verify_response_with:
function: validate_response:compare_response_with_pattern function: validate_response:compare_response_with_pattern
extra_kwargs: extra_kwargs:
method: "find" method: "tulpa"
directory: "database_api_patterns/find_account_recovery_requests" directory: "database_api_patterns/find_account_recovery_requests"
ignore_tags: ['id']
\ No newline at end of file
...@@ -24,5 +24,5 @@ ...@@ -24,5 +24,5 @@
verify_response_with: verify_response_with:
function: validate_response:compare_response_with_pattern function: validate_response:compare_response_with_pattern
extra_kwargs: extra_kwargs:
method: "find" method: "empty"
directory: "database_api_patterns/find_change_recovery_account_requests" directory: "database_api_patterns/find_change_recovery_account_requests"
{
"requests": [
{
"account_to_recover": "hive.test",
"effective_on": "2020-12-04T12:21:45",
"id": 4322,
"recovery_account": "hive.recovery"
}
]
}
---
test_name: Hived find_change_recovery_account_requests
marks:
- patterntest # find nonempty requests
includes:
- !include ../../common.yaml
stages:
- name: find_change_recovery_account_requests
request:
url: "{service.url:s}"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_change_recovery_account_requests"
params: {"accounts": ["hive.test"]}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "hive_test"
directory: "database_api_patterns/find_change_recovery_account_requests"
ignore_tags: ['requests'] # as requests stays active for 30 days, only posibility to test is to use block limit
\ No newline at end of file
...@@ -24,5 +24,5 @@ ...@@ -24,5 +24,5 @@
verify_response_with: verify_response_with:
function: validate_response:compare_response_with_pattern function: validate_response:compare_response_with_pattern
extra_kwargs: extra_kwargs:
method: "find" method: "empty"
directory: "database_api_patterns/find_decline_voting_rights_requests" directory: "database_api_patterns/find_decline_voting_rights_requests"
{
"requests": [
{
"account": "hive.test",
"effective_date": "2020-12-04T13:34:45",
"id": 11
}
]
}
---
test_name: Hived find_decline_voting_rights_requests
marks:
- patterntest # find nonempty requests
includes:
- !include ../../common.yaml
stages:
- name: find_decline_voting_rights_requests
request:
url: "{service.url:s}"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_decline_voting_rights_requests"
params: {"accounts": ["hive.test"]}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "hive_test"
directory: "database_api_patterns/find_decline_voting_rights_requests"
ignore_tags: ['requests'] # as requests stays active for 30 days, only posibility to test is to use block limit
\ No newline at end of file
{
"escrows": []
}
{
"escrows": [
{
"agent": "smitop",
"agent_approved": false,
"disputed": false,
"escrow_expiration": "2038-01-19T03:14:07",
"escrow_id": 12345,
"from": "temp",
"hbd_balance": {
"amount": "0",
"nai": "@@000000013",
"precision": 3
},
"hive_balance": {
"amount": "1",
"nai": "@@000000021",
"precision": 3
},
"id": 143,
"pending_fee": {
"amount": "1",
"nai": "@@000000021",
"precision": 3
},
"ratification_deadline": "2038-01-19T03:14:06",
"to": "guest123",
"to_approved": false
}
]
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_name: Hived find_escrows test_name: Hived find_escrows
marks: marks:
- patterntest # todo find nonempty escrows - patterntest
includes: includes:
- !include ../../common.yaml - !include ../../common.yaml
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
jsonrpc: "2.0" jsonrpc: "2.0"
id: 1 id: 1
method: "database_api.find_escrows" method: "database_api.find_escrows"
params: {"start":["gtg", 1], "limit":10, "order":"by_from_id"} params: {"from": "temp"}
response: response:
status_code: 200 status_code: 200
verify_response_with: verify_response_with:
function: validate_response:compare_response_with_pattern function: validate_response:compare_response_with_pattern
extra_kwargs: extra_kwargs:
method: "find" method: "temp"
directory: "database_api_patterns/find_escrows" directory: "database_api_patterns/find_escrows"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
jsonrpc: "2.0" jsonrpc: "2.0"
id: 1 id: 1
method: "database_api.find_vesting_delegation_expirations" method: "database_api.find_vesting_delegation_expirations"
params: {"account": "gtg"} params: {"account": "hive.test"}
response: response:
status_code: 200 status_code: 200
verify_response_with: verify_response_with:
......
{ {
"requests": [] "requests": [
{
"account_to_recover": "tulpa",
"expires": "2020-11-05T13:48:39",
"id": 9,
"new_owner_authority": {
"account_auths": [],
"key_auths": [
[
"STM6wxeXR9kg8uu7vX5LS4HBgKw8sdqHBpzAaacqPwPxYfRx9h5bS",
1
]
],
"weight_threshold": 1
}
}
]
} }
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
response: response:
status_code: 200 status_code: 200
verify_response_with: verify_response_with:
function: validate_response:compare_response_with_pattern function: validate_response:has_valid_response
extra_kwargs: extra_kwargs:
method: "list" method: "list"
directory: "database_api_patterns/list_account_recovery_requests" directory: "database_api_patterns/list_account_recovery_requests"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"can_vote": true, "can_vote": true,
"comment_count": 0, "comment_count": 0,
"created": "2016-06-30T17:22:18", "created": "2016-06-30T17:22:18",
"curation_rewards": 31313441, "curation_rewards": 31334574,
"delayed_votes": [], "delayed_votes": [],
"delegated_vesting_shares": { "delegated_vesting_shares": {
"amount": "0", "amount": "0",
...@@ -27,17 +27,17 @@ ...@@ -27,17 +27,17 @@
"precision": 6 "precision": 6
}, },
"downvote_manabar": { "downvote_manabar": {
"current_mana": "273518370165848", "current_mana": "273710368766170",
"last_update_time": 1604409438 "last_update_time": 1604501208
}, },
"hbd_balance": { "hbd_balance": {
"amount": "34", "amount": "40",
"nai": "@@000000013", "nai": "@@000000013",
"precision": 3 "precision": 3
}, },
"hbd_last_interest_payment": "2020-10-15T08:47:24", "hbd_last_interest_payment": "2020-10-15T08:47:24",
"hbd_seconds": "34197489", "hbd_seconds": "39626499",
"hbd_seconds_last_update": "2020-11-02T21:26:36", "hbd_seconds_last_update": "2020-11-04T14:46:27",
"id": 14007, "id": 14007,
"is_smt": false, "is_smt": false,
"json_metadata": "{\"profile\": {\"witness_description\": \"Gandalf the Grey, Steem Pressure, improving Steem infrastructure.\", \"about\": \"IT Wizard, Steem Witness\", \"profile_image\": \"https://grey.house/img/grey_4.jpg\", \"name\": \"Gandalf the Grey\", \"location\": \"Steem\"}}", "json_metadata": "{\"profile\": {\"witness_description\": \"Gandalf the Grey, Steem Pressure, improving Steem infrastructure.\", \"about\": \"IT Wizard, Steem Witness\", \"profile_image\": \"https://grey.house/img/grey_4.jpg\", \"name\": \"Gandalf the Grey\", \"location\": \"Steem\"}}",
...@@ -63,12 +63,12 @@ ...@@ -63,12 +63,12 @@
], ],
"weight_threshold": 1 "weight_threshold": 1
}, },
"pending_claimed_accounts": 12251, "pending_claimed_accounts": 12277,
"pending_transfers": 0, "pending_transfers": 0,
"post_bandwidth": 10000, "post_bandwidth": 10000,
"post_count": 5591, "post_count": 5591,
"post_voting_power": { "post_voting_power": {
"amount": "1094073480663395", "amount": "1094841475064686",
"nai": "@@000000037", "nai": "@@000000037",
"precision": 6 "precision": 6
}, },
...@@ -83,10 +83,10 @@ ...@@ -83,10 +83,10 @@
"weight_threshold": 1 "weight_threshold": 1
}, },
"posting_json_metadata": "{\"profile\":{\"witness_description\":\"Gandalf the Grey, Building Hive.\",\"about\":\"IT Wizard, Hive Witness\",\"profile_image\":\"https://grey.house/img/grey_4.jpg\",\"name\":\"Gandalf the Grey\",\"location\":\"Hive\",\"version\":2}}", "posting_json_metadata": "{\"profile\":{\"witness_description\":\"Gandalf the Grey, Building Hive.\",\"about\":\"IT Wizard, Hive Witness\",\"profile_image\":\"https://grey.house/img/grey_4.jpg\",\"name\":\"Gandalf the Grey\",\"location\":\"Hive\",\"version\":2}}",
"posting_rewards": 13408349, "posting_rewards": 13408464,
"proxied_vsf_votes": [ "proxied_vsf_votes": [
"4739442202456920", "4737195157018077",
"39346225171991", "39356563895873",
214349887, 214349887,
0 0
], ],
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
"savings_withdraw_requests": 0, "savings_withdraw_requests": 0,
"to_withdraw": 0, "to_withdraw": 0,
"vesting_shares": { "vesting_shares": {
"amount": "1085443853874105", "amount": "1086211848275396",
"nai": "@@000000037", "nai": "@@000000037",
"precision": 6 "precision": 6
}, },
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
"precision": 6 "precision": 6
}, },
"voting_manabar": { "voting_manabar": {
"current_mana": "1094073480663395", "current_mana": "1094841475064686",
"last_update_time": 1604409438 "last_update_time": 1604501208
}, },
"withdraw_routes": 0, "withdraw_routes": 0,
"withdrawn": 0, "withdrawn": 0,
......
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
verify_response_with: verify_response_with:
function: validate_response:compare_response_with_pattern function: validate_response:compare_response_with_pattern
extra_kwargs: extra_kwargs:
method: "list" method: "by_name"
directory: "database_api_patterns/list_accounts" directory: "database_api_patterns/list_accounts"
ignore_tags: ['accounts'] ignore_tags: ['accounts']
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment