Skip to content
Snippets Groups Projects
Commit 9c69959d authored by Paulina Czempiel's avatar Paulina Czempiel
Browse files

condenser_api get_blog negative tests moved to folder

parent be3dd819
No related branches found
No related tags found
1 merge request!70condenser_api_patterns get_blog moved to folder
Showing
with 200 additions and 0 deletions
{
"code": -32602,
"data": "invalid account char",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "invalid account char",
"message": "Invalid parameters"
}
---
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
{
"code": -32602,
"data": "start_index and limit combination is invalid (11, 20)",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "start_index and limit combination is invalid (11, 20)",
"message": "Invalid parameters"
}
---
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
{
"code": -32602,
"data": "account not found: `non.existing`",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "account not found: `non.existing`",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_blog non existing account test
marks:
- patterntest # wrong response, should be clean error (now there is no way to make difference between nonexisting account and account that does not blog)
- negative
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
{
"code": -32602,
"data": "limit exceeds max (501 > 500)",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "limit exceeds max (501 > 500)",
"message": "Invalid parameters"
}
---
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
{
"code": -32602,
"data": "invalid account name length: `too.long.account.name`",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "invalid account name length: `too.long.account.name`",
"message": "Invalid parameters"
}
---
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
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