Commit f4faa6ba authored by Andrzej Lisak's avatar Andrzej Lisak
Browse files

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

parents 388727f9 9c69959d
{
"code": -32602,
"data": "invalid account char",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "invalid account char",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_blog invalid account test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog invalid 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: "condenser_api.get_blog"
params: {"account":"invalid_account","start_entry_id":0,"limit":1}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_account"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "start_index and limit combination is invalid (11, 20)",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "start_index and limit combination is invalid (11, 20)",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_blog invalid limit combination patterns test
marks:
- patterntest # call returns post entries starting at start_entry_id going down towards 0 until limit, therefore limit <= start_entry_id + 1 (unless start_entry_id is 0 or -1)
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog invalid limit combination
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_blog"
params: {"account":"gtg","start_entry_id":11,"limit":20}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "invalid_limit_combo"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "account not found: `non.existing`",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "account not found: `non.existing`",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_blog non existing account test
marks:
- patterntest # wrong response, should be clean error (now there is no way to make difference between nonexisting account and account that does not blog)
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog non existing 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: "condenser_api.get_blog"
params: {"account":"non.existing","start_entry_id":0,"limit":1}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "non_existing"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "limit exceeds max (501 > 500)",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "limit exceeds max (501 > 500)",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_blog over limit test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog over limit
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_blog"
params: {"account":"steemit","start_entry_id":0,"limit":501}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "over_limit"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
{
"code": -32602,
"data": "invalid account name length: `too.long.account.name`",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "invalid account name length: `too.long.account.name`",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_blog too long account name test
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_blog too long account name
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_blog"
params: {"account":"too.long.account.name","start_entry_id":0,"limit":1}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "too_long"
directory: "condenser_api_negative/get_blog"
error_response: true
\ No newline at end of file
[
{
"blog": "steemit",
"comment": {
"active_votes": [
{
"percent": "100",
"reputation": 0,
"rshares": "375241",
"voter": "dantheman"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "886132",
"voter": "mr11acdee"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "5100",
"voter": "steemit78"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "1259167",
"voter": "anonymous"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "318519",
"voter": "hello"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "153384",
"voter": "world"
},
{
"percent": "-100",
"reputation": 0,
"rshares": "-936400",
"voter": "ned"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "59412",
"voter": "fufubar1"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "14997",
"voter": "anonymous1"
},
{
"percent": "100",
"reputation": 0,
"rshares": "1441",
"voter": "red"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "551390835500",
"voter": "liondani"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "82748",
"voter": "roadscape"
},
{
"percent": "100",
"reputation": 0,
"rshares": "10772",
"voter": "xeroc"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "7685088000",
"voter": "markopaasila"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "454510724",
"voter": "tshering-tamang"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "681946946",
"voter": "romangelsi"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "504895891",
"voter": "dedmatvey"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "498863058",
"voter": "joelinux"
},
{
"percent": "0",
"reputation": 0,
"rshares": "9590417",
"voter": "piranhax"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "473258270",
"voter": "ned-reddit-login"
},
{
"percent": "3600",
"reputation": 0,
"rshares": "0",
"voter": "fernando-sanz"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "425903066",
"voter": "gekko"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "381805870",
"voter": "gilang-ramadhan"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "392459059",
"voter": "kamvreto"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "422984262",
"voter": "acidyo"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "47179379651",
"voter": "tosch"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "7831667988",
"voter": "klye"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "1019950749",
"voter": "coar"
},
{
"percent": "1509",
"reputation": 0,
"rshares": "1746058458",
"voter": "murh"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "22639073725",
"voter": "drinkzya"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "0",
"voter": "hien-tran"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "742566481",
"voter": "patrick-g"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "40624969",
"voter": "ben99"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "1742755097",
"voter": "sunshinecrypto"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "108855472",
"voter": "kingtylervvs"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "485112237",
"voter": "marinabogumil"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "917398502",
"voter": "decrypt"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "5067187498",
"voter": "senseiteekay"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "5154897955",
"voter": "r33drum"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "5033902237",
"voter": "cryptosi"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "1037079223",
"voter": "condra"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "233032838",
"voter": "jearson"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "240809500",
"voter": "tritium"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "123321995",
"voter": "allmonitors"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "226074637",
"voter": "artjedi"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "931542394",
"voter": "anduweb"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "2292983350",
"voter": "inertia"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "128561059",
"voter": "maximkichev"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "183438273",
"voter": "a9inchcock"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "266262926",
"voter": "desmonid"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "71498008",
"voter": "madhatting"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "23726644841",
"voter": "ubg"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "3741408303",
"voter": "royaltiffany"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "131577259",
"voter": "gribgo"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "12371398765",
"voter": "deanliu"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "28907874049",
"voter": "orm"
},
{
"percent": "10000",
"reputation": 0,
"rshares": "528988007",
"voter": "qonq99"
},
{
"percent": "10000",
"reputation": 0,