Skip to content
Snippets Groups Projects
Commit fbe4b2fd authored by Andrzej Lisak's avatar Andrzej Lisak
Browse files

Merge branch 'pmaniora_more_bridge_api_tests' into 'master'

more bridge api tests

See merge request !137
parents 3d3daf0c 3f308b5d
No related branches found
No related tags found
1 merge request!137more bridge api tests
Showing
with 215 additions and 5 deletions
{
"code": -32602,
"data": "too many keyword arguments {'extra_parameter': 'extra_value'}",
"message": "Invalid parameters"
}
{ {
"code": -32602, "code": -32602,
"data": "start_index and limit combination is invalid (11, 20)", "data": "got an unexpected keyword argument 'extra_parameter'",
"message": "Invalid parameters" "message": "Invalid parameters"
} }
---
test_name: Hivemind bridge.get_account_posts extra parameter
marks:
- patterntest
- negative
includes:
- !include ../../../common.yaml
stages:
- name: get_account_posts extra parameter
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_account_posts"
params: {"sort":"blog","account":"steemit","extra_parameter":"extra_value"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "extra_parameter"
directory: "bridge_api_negative/get_account_posts/blog"
error_response: true
\ No newline at end of file
{ {
"code": -32602, "code": -32602,
"data": "account not found: `rollinshive`", "data": "invalid account char",
"message": "Invalid parameters" "message": "Invalid parameters"
} }
{ {
"code": -32602, "code": -32602,
"data": "Account rollinshive does not exist", "data": "invalid account char",
"message": "Invalid parameters" "message": "Invalid parameters"
} }
--- ---
test_name: Hivemind bridge.get_account_posts test_name: Hivemind bridge.get_account_posts invalid account
marks: marks:
- patterntest - patterntest
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
- !include ../../../common.yaml - !include ../../../common.yaml
stages: stages:
- name: get_account_posts - name: get_account_posts invalid account
request: request:
url: "{service.proto:s}://{service.server:s}:{service.port}/" url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST method: POST
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
jsonrpc: "2.0" jsonrpc: "2.0"
id: 1 id: 1
method: "bridge.get_account_posts" method: "bridge.get_account_posts"
params: {"sort":"blog","account":"rollinshive"} params: {"sort":"blog","account":"invalid_account"}
response: response:
status_code: 200 status_code: 200
verify_response_with: verify_response_with:
......
{ {
"code": -32602, "code": -32602,
"data": "start_index and limit combination is invalid (11, 20)", "data": "account not found: `invalid_account`",
"message": "Invalid parameters" "message": "Invalid parameters"
} }
{
"code": -32602,
"data": "invalid account char",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge.get_account_posts invalid observer
marks:
- patterntest # original validated observer but then ignored (it is also ignored now even though it makes no sense)
- negative
includes:
- !include ../../../common.yaml
stages:
- name: get_account_posts invalid observer
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_account_posts"
params: {"sort":"blog","account":"steemit","observer": "invalid_account"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_observer"
directory: "bridge_api_negative/get_account_posts/blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "invalid account char",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "invalid account char",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge.get_account_posts invalid start author
marks:
- patterntest
- negative
includes:
- !include ../../../common.yaml
stages:
- name: get_account_posts invalid start author
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_account_posts"
params: {"sort":"blog","account":"steemit","start_author": "invalid_account"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_start_author"
directory: "bridge_api_negative/get_account_posts/blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "permlink must be string",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "permlink must be string",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge.get_account_posts invalid start permlink
marks:
- patterntest
- negative
includes:
- !include ../../../common.yaml
stages:
- name: get_account_posts invalid start permlink
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_account_posts"
params: {"sort":"blog","account":"steemit","start_author": "steemit","start_permlink":98}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_start_permlink"
directory: "bridge_api_negative/get_account_posts/blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "account not found: `rollinshive`",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "Account rollinshive does not exist",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge.get_account_posts
marks:
- patterntest
- negative
includes:
- !include ../../../common.yaml
stages:
- name: get_account_posts
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_account_posts"
params: {"sort":"blog","account":"rollinshive"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "not_existing_account"
directory: "bridge_api_negative/get_account_posts/blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "invalid author/permlink",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "Post gtg/non_existing_permlink does not exist",
"message": "Invalid parameters"
}
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