Commit 2777455f authored by Andrzej Lisak's avatar Andrzej Lisak
Browse files

Merge branch 'get_blog' into 'master'

condenser_api_patterns get_blog moved to folder

See merge request !70
parents 388727f9 27d04e4b
---
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_blog limit 100 patterns test
marks:
- patterntest # original had trouble with the call, when limit exceeded number of post entries error was returned
# see https://gitlab.syncad.com/hive/hivemind/-/issues/53 - pattern/original prepared with limit 1
includes:
- !include ../../common.yaml
stages:
- name: get_blog limit 100
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":100}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "limit_hundred"
directory: "condenser_api_patterns/get_blog"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment