Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hive/tests_api
1 result
Show changes
Commits on Source (5)
Showing
with 136 additions and 20 deletions
......@@ -19,7 +19,6 @@
"stats": {
"followers": 305,
"following": 0,
"rank": 0,
"sp": 0
"rank": 0
}
}
\ No newline at end of file
......@@ -19,7 +19,6 @@
"stats": {
"followers": 175,
"following": 0,
"rank": 0,
"sp": 0
"rank": 0
}
}
\ No newline at end of file
......@@ -19,7 +19,6 @@
"stats": {
"followers": 3363,
"following": 0,
"rank": 1396698,
"sp": 0
"rank": 1396698
}
}
\ No newline at end of file
{
"code": -32602,
"data": "post '@gtg/not_existing_permlink' does not exist",
"data": "Post gtg/not_existing_permlink does not exist",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge_api.get_post_header not existing permlink patterns test
# not documented on https://developers.hive.io/apidefinitions/#apidefinitions-bridge
marks:
- patterntest # original gives no error, just no result
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_post_header gtg
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_post_header"
params: {"author":"gtg", "permlink":"not_existing_permlink"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "post_not_found"
directory: "bridge_api_negative/get_post_header"
error_response: true
---
test_name: Hivemind bridge_api.get_post_header patterns test
# not documented on https://developers.hive.io/apidefinitions/#apidefinitions-bridge
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: get_post_header
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_post_header"
params: {"author":"steemit", "permlink":"firstpost"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "steemit"
directory: "bridge_api_patterns/get_post_header"
{
"active": "1970-01-01T00:00:00",
"active": "2016-03-30T18:30:18",
"blacklists": [],
"created": "2016-03-24T17:00:21",
"id": 29,
"metadata": {
"profile": {
"about": null,
"about": "",
"cover_image": "",
"location": null,
"name": null,
"location": "",
"name": "",
"profile_image": "",
"website": null
"website": ""
}
},
"name": "steemit",
"post_count": 0,
"post_count": 1,
"reputation": 25.0,
"stats": {
"followers": 175,
"following": 0,
"rank": 0,
"sp": 0
"rank": 0
}
}
......@@ -19,7 +19,6 @@
"stats": {
"followers": 80,
"following": 31,
"rank": 0,
"sp": 8854
"rank": 0
}
}
{
"code": -32602,
"data": "account 'not.existing' does not exist",
"data": "Account 'not.existing' does not exist",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_followers over limit test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_followers over limit
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_followers"
params: ["steemit",null,"blog",1001]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "over_limit"
directory: "condenser_api_negative/get_followers"
error_response: true
---
test_name: Hivemind condenser_api.get_followers patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: get_followers
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_followers"
params: ["steemit",null,"blog",10]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "blog"
directory: "condenser_api_patterns/get_followers"
......@@ -9,8 +9,8 @@
"feed": [],
"json_metadata": "{\"profile\":{\"name\":null,\"about\":null,\"website\":null,\"location\":null,\"cover_image\":\"\",\"profile_image\":\"\"}}",
"name": "steemit",
"net_vesting_shares": 0.0,
"post_count": 0,
"net_vesting_shares": 0,
"post_count": 1,
"recent_replies": [],
"reputation": 0,
"transfer_history": []
......@@ -676,4 +676,4 @@
"trending": []
},
"tags": {}
}
\ No newline at end of file
}