Commit f5b38d84 authored by Andrzej Lisak's avatar Andrzej Lisak

Merge branch 'pmaniora_separate_tests' of gitlab.syncad.com:hive/tests_api...

Merge branch 'pmaniora_separate_tests' of gitlab.syncad.com:hive/tests_api into pmaniora_separate_tests
parents cd06a34b 5e510260
{
"code": -32602,
"data": "invalid sort",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "invalid sort",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge_api.get_ranked_posts sort invalid patterns test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: bridge_api.get_ranked_posts sort invalid patterns test
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_ranked_posts"
params: {"sort":"invalid_sort","tag":"","observer":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_sort"
directory: "bridge_api_negative/get_ranked_posts"
error_response: true
{
"code": -32602,
"data": "no account name specified",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge_api.get_relationship_between_accounts account1 empty # 8080
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_relationship_between_accounts account1 empty
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.list_all_subscriptions"
params: {"account":""}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "account1_empty"
directory: "bridge_api_negative/get_relationship_between_accounts"
error_response: true
......@@ -2,7 +2,7 @@
test_name: bridge_api.list_pop_communities invalid literal # 8080 023
marks:
- patterntest
- patterntest # change to proper error, server error is barely acceptable here
- negative
includes:
......
......@@ -4,7 +4,7 @@
# no nonempty result possible for 5mln set
marks:
- patterntest
- patterntest # change to proper error, server error is barely acceptable here
- negative
includes:
......
---
test_name: bridge_api.list_subscribers account error # not documented
marks:
- patterntest # error should be generated here, but we get empty result (like in original)
- negative
includes:
- !include ../../common.yaml
stages:
- name: bridge_api.list_subscribers community lacking value
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.list_subscribers"
params: ['789']
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "account_error"
directory: "bridge_api_negative/list_subscribers"
{
"code": -32602,
"data": "'author' parameter lacking default value",
"message": "Invalid parameters"
}
---
test_name: Hivemind bridge.post_notifications patterns test no parames # openapi bc there is no notifs in 5mln set
# post_notifications(context, author, permlink, min_score=25, last_id=None, limit=100) last_id - notification id
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: bridge.post_notifications patterns test no parames
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.post_notifications"
params: {}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "empty_params"
directory: "bridge_api_negative/post_notifications"
error_response: true
{
"code": -32602,
"data": "'permlink' parameter lacking default value",
"message": "Invalid parameters"
}
\ No newline at end of file
---
test_name: Hivemind bridge.post_notifications patterns test only account
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: bridge.post_notifications patterns test only 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: "bridge.post_notifications"
params: {"author":"acidyo"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "only_account"
directory: "bridge_api_negative/post_notifications"
error_response: true
---
test_name: Hivemind bridge.get_account_posts test
marks:
- patterntest
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":"replies","account":"gtg","observer":null}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "gtg"
directory: "bridge_api_patterns/get_account_posts"
\ No newline at end of file
---
test_name: Hivemind bridge.get_account_posts test
marks:
- patterntest
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":"posts","account":"gtg","observer":null}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "gtg_posts"
directory: "bridge_api_patterns/get_account_posts"
\ No newline at end of file
---
test_name: Hivemind bridge.get_account_posts test not existing account (yet)
marks:
- patterntest
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":"replies","account":"rollinshive","observer":null}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "rollinshive"
directory: "bridge_api_patterns/get_account_posts"
\ No newline at end of file
......@@ -2,7 +2,7 @@
test_name: Hivemind condenser_api.get_active_votes patterns test 3 args 33091
marks:
- patterntest
- patterntest # change to proper error, server error is barely acceptable here
- negative
includes:
......
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