Commit 0c2000f8 authored by Andrzej Lisak's avatar Andrzej Lisak

Merge branch 'get_active_votes' into 'master'

condenser_api get_active_votes tests moved to folder

See merge request !92
parents 9812df8c 3766670e
{
"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-14T18:32:20"
},
"data": {
"author": "noodhoog",
"permlink": "",
"what": "unknown key"
},
"format": "${what}: "
}
]
},
"message": "unknown key:unknown key: "
}
{
"code": -32602,
"data": "permlink cannot be blank",
"message": "Invalid parameters"
}
---
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
{
"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-14T18:32:20"
},
"data": {
"author": "",
"permlink": "",
"what": "unknown key"
},
"format": "${what}: "
}
]
},
"message": "unknown key:unknown key: "
}
{
"code": -32602,
"data": "invalid account (not specified)",
"message": "Invalid parameters"
}
---
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
{
"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",
"timestamp": "2020-09-14T18:32:20"
},
"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"
}
{
"code": -32602,
"data": "too many positional arguments",
"message": "Invalid parameters"
}
---
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
{
"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-14T18:32:20"
},
"data": {
"author": "ciao",
"permlink": "re-the-amazing-mr-hydde-20160811t213717",
"what": "unknown key"
},
"format": "${what}: "
}
]
},
"message": "unknown key:unknown key: "
}
{
"code": -32602,
"data": "Post ciao/re-the-amazing-mr-hydde-20160811t213717 does not exist",
"message": "Invalid parameters"
}
---
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
---
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
---
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
......@@ -27,35 +27,6 @@
method: "get_blog_entries"
directory: "condenser_api_patterns"
---
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: "get_active_votes"
directory: "condenser_api_patterns"
---
test_name: Hivemind deprecated condenser_api.get_account_votes
......
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