Commit 187d8da4 authored by Andrzej Lisak's avatar Andrzej Lisak

Merge branch 'pmaniora_separate_tests' into 'master'

bridge API separate tests

See merge request !94
parents cd06a34b 6b6feb97
{
"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"
}
{
"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
---
test_name: bridge_api.list_subscribers account error # not documented
marks:
- patterntest
- negative
- xfail # error should be generated here, but we get empty result (like in original)
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"
error_response: true
{
"code": -32602,
"data": "'author' parameter lacking default value",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "missing a required argument: 'author'",
"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"
}
{
"code": -32602,
"data": "missing a required argument: 'permlink'",
"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_api.get_account_posts sort blog patterns test
# not documented on https://developers.hive.io/apidefinitions/#apidefinitions-bridge
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: get_account_posts sort blog
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"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "blog_steemit"
directory: "bridge_api_patterns/get_account_posts"
---
test_name: Hivemind bridge_api.get_account_posts sort comments patterns test
marks:
- patterntest # should return posts, now its empty (hive3 hivemind)
includes:
- !include ../../common.yaml
stages:
- name: get_account_posts sort comments
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":"comments", "account":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comments_steemit"
directory: "bridge_api_patterns/get_account_posts"
---
test_name: Hivemind bridge_api.get_account_posts sort feed patterns test
marks:
- patterntest # should return posts, now its empty (hive3 hivemind)
includes:
- !include ../../common.yaml
stages:
- name: get_account_posts sort feed
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":"feed", "account":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "feed_steemit"
directory: "bridge_api_patterns/get_account_posts"
---
test_name: Hivemind bridge_api.get_account_posts sort payout patterns test
marks:
- patterntest # should return posts, now its empty (hive3 hivemind)
includes:
- !include ../../common.yaml
stages:
- name: get_account_posts sort payout
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":"payout", "account":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "payout_steemit"
directory: "bridge_api_patterns/get_account_posts"
---
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: "posts_gtg"
directory: "bridge_api_patterns/get_account_posts"
\ No newline at end of file
---
test_name: Hivemind bridge_api.get_account_posts patterns test
# not documented on https://developers.hive.io/apidefinitions/#apidefinitions-bridge
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":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "posts_steemit"
directory: "bridge_api_patterns/get_account_posts"
---
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: "replies_gtg"
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: "replies_rollinshive"
directory: "bridge_api_patterns/get_account_posts"
\ No newline at end of file
---
test_name: Hivemind bridge_api.get_account_posts sort replies patterns test
# not documented on https://developers.hive.io/apidefinitions/#apidefinitions-bridge
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: get_account_posts sort replies
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":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "replies_steemit"
directory: "bridge_api_patterns/get_account_posts"
......@@ -145,180 +145,6 @@
method: "get_post_gtg"
directory: "bridge_api_patterns"
---
test_name: Hivemind bridge_api.get_account_posts patterns test
# not documented on https://developers.hive.io/apidefinitions/#apidefinitions-bridge
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":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "get_account_posts"
directory: "bridge_api_patterns"
---
test_name: Hivemind bridge_api.get_account_posts sort blog patterns test
# not documented on https://developers.hive.io/apidefinitions/#apidefinitions-bridge
marks:
- patterntest
includes:
- !include common.yaml
stages:
- name: get_account_posts sort blog
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"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "get_account_posts_sort_blog"
directory: "bridge_api_patterns"
---
test_name: Hivemind bridge_api.get_account_posts sort feed patterns test
marks:
- patterntest # should return posts, now its empty (hive3 hivemind)
includes:
- !include common.yaml
stages:
- name: get_account_posts sort feed
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":"feed", "account":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "get_account_posts_sort_feed"
directory: "bridge_api_patterns"
---
test_name: Hivemind bridge_api.get_account_posts sort comments patterns test
marks:
- patterntest # should return posts, now its empty (hive3 hivemind)
includes:
- !include common.yaml
stages:
- name: get_account_posts sort comments
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":"comments", "account":"steemit"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "get_account_posts_sort_comments"