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 (93)
Showing
with 182 additions and 0 deletions
---
test_name: Hivemind condenser_api.get_blog invalid account test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog invalid account
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_blog"
params: {"account":"invalid_account","start_entry_id":0,"limit":1}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_account"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_blog invalid limit combination patterns test
marks:
- patterntest # call returns post entries starting at start_entry_id going down towards 0 until limit, therefore limit <= start_entry_id + 1 (unless start_entry_id is 0 or -1)
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog invalid limit combination
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_blog"
params: {"account":"gtg","start_entry_id":11,"limit":20}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_limit_combo"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_blog non existing account test
marks:
- patterntest
- negative
- failing
- xfail # wrong response, should be clean error (now there is no way to make difference between nonexisting account and account that does not blog)
includes:
- !include ../../common.yaml
stages:
- name: get_blog non existing account
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_blog"
params: {"account":"non.existing","start_entry_id":0,"limit":1}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "non_existing"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_blog over limit test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog 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_blog"
params: {"account":"steemit","start_entry_id":0,"limit":501}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "over_limit"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_blog too long account name test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog too long account name
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_blog"
params: {"account":"too.long.account.name","start_entry_id":0,"limit":1}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "too_long"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_comment_discussions_by_payout over limit test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_comment_discussions_by_payout 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_comment_discussions_by_payout"
params: {"tag":"tag","limit":101}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "over_limit"
directory: "condenser_api_negative/get_comment_discussions_by_payout"
error_response: true
\ No newline at end of file