Skip to content
Snippets Groups Projects
Commit f8360888 authored by Pawel Maniora's avatar Pawel Maniora
Browse files

database api separate tests

parent baf3897a
No related branches found
No related tags found
1 merge request!77database api separate tests
Showing
with 617 additions and 0 deletions
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "database_api.cpp",
"hostname": "",
"level": "error",
"line": 1280,
"method": "find_votes"
},
"data": {
"a": "",
"p": ""
},
"format": "comment != nullptr: Could not find comment ${a}/${p}"
}
]
},
"message": "Assert Exception:comment != nullptr: Could not find comment /"
}
---
test_name: Hivemind database_api.find_votes cdomment not found
marks:
- patterntest
- negative # on API docs it "shows" {
# "votes": [
# {
# "id": 0,
# "voter": "",
# "author": "",
# "permlink": "",
# "weight": "0",
# "rshares": 0,
# "vote_percent": 0,
# "last_update": "2016-04-07T19:15:36",
# "num_changes": -1
# }
# ]
# }
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_votes"
params:
{
"author": "",
"permlink": "",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "database_api.cpp",
"hostname": "",
"level": "error",
"line": 1280,
"method": "find_votes"
},
"data": {
"a": "kental",
"p": ""
},
"format": "comment != nullptr: Could not find comment ${a}/${p}"
}
]
},
"message": "Assert Exception:comment != nullptr: Could not find comment kental/"
}
---
test_name: Hivemind database_api.find_votes cdomment not found 2
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found 2
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_votes"
params:
{
"author": "kental",
"permlink": "",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found2"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "database_api.cpp",
"hostname": "",
"level": "error",
"line": 1280,
"method": "find_votes"
},
"data": {
"a": "",
"p": "hi-steem-my-russian-trip-on-the-bike-big-party-in-moscow-tour-of-moscow-by-slava"
},
"format": "comment != nullptr: Could not find comment ${a}/${p}"
}
]
},
"message": "Assert Exception:comment != nullptr: Could not find comment /hi-steem-my-russian-trip-on-the-bike-big-party-in-moscow-tour-of-moscow-by-slava"
}
---
test_name: Hivemind database_api.find_votes cdomment not found by permlink
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found by permlink
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_votes"
params:
{
"author": "",
"permlink": "hi-steem-my-russian-trip-on-the-bike-big-party-in-moscow-tour-of-moscow-by-slava",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found_by_permlink"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "database_api.cpp",
"hostname": "",
"level": "error",
"line": 1280,
"method": "find_votes"
},
"data": {
"a": "hiveio",
"p": "firstpost"
},
"format": "comment != nullptr: Could not find comment ${a}/${p}"
}
]
},
"message": "Assert Exception:comment != nullptr: Could not find comment hiveio/firstpost"
}
---
test_name: Hivemind database_api.find_votes cdomment not found hiveio firstpost
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found hiveio firstpost
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_votes"
params:
{
"author": "hiveio",
"permlink": "firstpost",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found_hiveio_firstpost"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32000,
"data": {
"code": 13,
"message": "Day of month value is out of range 1..31",
"name": "N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEEE",
"stack": [
{
"context": {
"file": "time.cpp",
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
},
"data": {
"what": "Day of month value is out of range 1..31"
},
"format": "${what}: unable to convert ISO-formatted string to fc::time_point_sec"
}
]
},
"message": "Day of month value is out of range 1..31:Day of month value is out of range 1..31: unable to convert ISO-formatted string to fc::time_point_sec"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range
marks:
- patterntest
- negative
- failing
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_comments day of the month out of range
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_comments"
params:
{ "start": ["", "", ""], "limit": 10, "order": "by_cashout_time" }
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_of_the_month_out_of_range"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
\ No newline at end of file
{
"code": -32000,
"data": {
"code": 13,
"message": "Day of month value is out of range 1..31",
"name": "N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEEE",
"stack": [
{
"context": {
"file": "time.cpp",
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
},
"data": {
"what": "Day of month value is out of range 1..31"
},
"format": "${what}: unable to convert ISO-formatted string to fc::time_point_sec"
}
]
},
"message": "Day of month value is out of range 1..31:Day of month value is out of range 1..31: unable to convert ISO-formatted string to fc::time_point_sec"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range "by_last_update"
marks:
- patterntest
- negative
- failing
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_comments day of the month out of range "by_last_update"
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_comments"
params:
{ "start": ["", "", "", ""], "limit": 10, "order": "by_last_update" }
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_out_of_range_empty"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32000,
"data": {
"code": 13,
"message": "Day of month value is out of range 1..31",
"name": "N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEEE",
"stack": [
{
"context": {
"file": "time.cpp",
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
},
"data": {
"what": "Day of month value is out of range 1..31"
},
"format": "${what}: unable to convert ISO-formatted string to fc::time_point_sec"
}
]
},
"message": "Day of month value is out of range 1..31:Day of month value is out of range 1..31: unable to convert ISO-formatted string to fc::time_point_sec"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range start 0
marks:
- patterntest # first arg is author, not date (error about date)
- negative
- failing
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_comments day of the month out of range start 0
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_comments"
params:
{
"start": ["2016-08-24T21:29:42", "", "", ""],
"limit": 10,
"order": "by_last_update",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_out_of_range_start_0"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32000,
"data": {
"code": 13,
"message": "Day of month value is out of range 1..31",
"name": "N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEEE",
"stack": [
{
"context": {
"file": "time.cpp",
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
},
"data": {
"what": "Day of month value is out of range 1..31"
},
"format": "${what}: unable to convert ISO-formatted string to fc::time_point_sec"
}
]
},
"message": "Day of month value is out of range 1..31:Day of month value is out of range 1..31: unable to convert ISO-formatted string to fc::time_point_sec"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range start 3
marks:
- patterntest # first arg is author, not date (error about date)
- negative
- failing
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_comments day of the month out of range start 3
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_comments"
params:
{
"start": ["", "2016-04-66T21:29:42", "", ""],
"limit": 10,
"order": "by_last_update"
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_out_of_range_start_3"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "database_api.cpp",
"hostname": "",
"level": "error",
"line": 1215,
"method": "votes_impl"
},
"data": {
"a": "roelandp",
"p": ""
},
"format": "comment != nullptr: Could not find comment ${a}/${p}."
}
]
},
"message": "Assert Exception:comment != nullptr: Could not find comment roelandp/."
}
---
test_name: Hivemind database_api.list_votes patterns test order "by_comment_voter" comment not found
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_votes patterns test order "by_comment_voter" comment not found
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_votes"
params:
{
"start": ["roelandp", "", ""],
"limit": 10,
"order": "by_comment_voter",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found"
directory: "database_api_negative/list_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "database_api.cpp",
"hostname": "",
"level": "error",
"line": 1215,
"method": "votes_impl"
},
"data": {
"a": "roelandp",
"p": ""
},
"format": "comment != nullptr: Could not find comment ${a}/${p}."
}
]
},
"message": "Assert Exception:comment != nullptr: Could not find comment roelandp/."
}
---
test_name: Hivemind database_api.list_votes patterns test order "by_comment_voter" comment not found 2
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_votes patterns test order "by_comment_voter" comment not found 2
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_votes"
params:
{
"start": ["", "roelandp", ""],
"limit": 10,
"order": "by_voter_comment",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found2"
directory: "database_api_negative/list_votes"
error_response: true
ignore_tags: ["timestamp"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment