Commit fc56d9fa authored by Andrzej Lisak's avatar Andrzej Lisak

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

parents 9812df8c 9e8debd9
{
"code": -32000,
"data": {
"code": 13,
"message": "unknown key",
"name": "N5boost16exception_detail10clone_implINS0_19error_info_injectorISt12out_of_rangeEEEE",
"stack": [
{
"context": {
"file": "database.cpp",
"hostname": "",
"level": "warn",
"line": 606,
"method": "get_comment"
},
"data": {
"author": "noodhoog",
"permlink": "",
"what": "unknown key"
},
"format": "${what}: "
}
]
},
"message": "unknown key:unknown key: "
}
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_active_votes patterns test author 33091
marks:
- patterntest # required values
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_active_votes
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_active_votes"
params: ["noodhoog",""]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "author"
directory: "condenser_api_negative/get_active_votes"
error_response: true
ignore_tags: ["timestamp"]
\ No newline at end of file
{
"code": -32000,
"data": {
"code": 13,
"message": "unknown key",
"name": "N5boost16exception_detail10clone_implINS0_19error_info_injectorISt12out_of_rangeEEEE",
"stack": [
{
"context": {
"file": "database.cpp",
"hostname": "",
"level": "warn",
"line": 606,
"method": "get_comment",
"timestamp": "2020-09-14T09:36:25"
},
"data": {
"author": "",
"permlink": "",
"what": "unknown key"
},
"format": "${what}: "
}
]
},
"message": "unknown key:unknown key: "
}
---
test_name: Hivemind condenser_api.get_active_votes patterns test no data 33091
marks:
- patterntest # required values
- negative # timestamp changes
includes:
- !include ../../common.yaml
stages:
- name: get_active_votes
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_active_votes"
params: ["",""]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "no_data"
directory: "condenser_api_negative/get_active_votes"
error_response: true
ignore_tags: ["timestamp"]
\ No newline at end of file
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "condenser_api.cpp",
"hostname": "",
"level": "error",
"line": 1266,
"method": "get_active_votes"
},
"data": {
"n": 3
},
"format": "args.size() == 2: Expected #s argument(s), was ${n}"
}
]
},
"message": "Assert Exception:args.size() == 2: Expected #s argument(s), was 3"
}
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_active_votes patterns test 3 args 33091
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_active_votes
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_active_votes"
params: ["ciao", "re-the-amazing-mr-hydde-20160811t213650", ""]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "three_args"
directory: "condenser_api_negative/get_active_votes"
error_response: true
ignore_tags: ["timestamp"]
\ No newline at end of file
{
"code": -32000,
"data": {
"code": 13,
"message": "unknown key",
"name": "N5boost16exception_detail10clone_implINS0_19error_info_injectorISt12out_of_rangeEEEE",
"stack": [
{
"context": {
"file": "database.cpp",
"hostname": "",
"level": "warn",
"line": 606,
"method": "get_comment"
},
"data": {
"author": "ciao",
"permlink": "re-the-amazing-mr-hydde-20160811t213717",
"what": "unknown key"
},
"format": "${what}: "
}
]
},
"message": "unknown key:unknown key: "
}
---
test_name: Hivemind condenser_api.get_active_votes patterns test wrong author 33091
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_active_votes
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_active_votes"
params: ["ciao","re-the-amazing-mr-hydde-20160811t213717"]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "wrong_author"
directory: "condenser_api_negative/get_active_votes"
error_response: true
ignore_tags: ["timestamp"]
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_active_votes patterns test all data 33091
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: get_active_votes
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_active_votes"
params: ["noodhoog","steem-opening-the-forgotten-economy"]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "all_data"
directory: "condenser_api_patterns/get_active_votes"
\ No newline at end of file
[
{
"percent": 10000,
"reputation": 0,
"rshares": 0,
"time": "2016-08-20T02:59:39",
"voter": "endgame",
"weight": 0
},
{
"percent": 10000,
"reputation": 0,
"rshares": "28030089381",
"time": "2016-07-19T20:00:30",
"voter": "biophil",
"weight": 0
},
{
"percent": 10000,
"reputation": 0,
"rshares": 52512184,
"time": "2016-07-19T20:01:15",
"voter": "seagul",
"weight": "5970197932869"
}
]
\ No newline at end of file
[
{
"percent": 10000,
"reputation": 0,
"rshares": 0,
"time": "2016-08-20T02:59:39",
"voter": "endgame",
"weight": 0
},
{
"percent": 10000,
"reputation": 0,
"rshares": "28030089381",
"time": "2016-07-19T20:00:30",
"voter": "biophil",
"weight": 0
},
{
"percent": 10000,
"reputation": 0,
"rshares": 52512184,
"time": "2016-07-19T20:01:15",
"voter": "seagul",
"weight": "5970197932869"
}
]
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_active_votes patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: get_active_votes
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_active_votes"
params: ["biophil","test"]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "biophil"
directory: "condenser_api_patterns/get_active_votes"
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_active_votes patterns test empty votes 33091
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: get_active_votes
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_active_votes"
params: ["lillianjones","re-the-amazing-mr-hydde-20160811t213717"]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "no_votes"
directory: "condenser_api_patterns/get_active_votes"
\ 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