Commit f856e32f authored by Andrzej Lisak's avatar Andrzej Lisak

[ABW]: added .orig files to new tests

some tests renamed to better reflect the content
added some tests to supplement checks on the same API as new tests
accepted typical differences in new patterns
fixed patterns added recently as the find_votes/list_votes was not giving fully proper response
recently added tests separated to their own .yaml files
parent bb050a76
{
"comments": [
{
"abs_rshares": 0,
"active": "2016-08-03T13:23:48",
"allow_curation_rewards": true,
"allow_replies": true,
"allow_votes": true,
"author": "magicmonk",
"author_rewards": 831270,
"beneficiaries": [],
"body": "**Hello everyone on Steem!!**\n![My picture](https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xfp1/t31.0-8/12698631_1001956866545660_8622549576218702447_o.jpg)\n\n**I am super excited** to finally be part of Steem! I have so much to share with you all and I look forward to learning with and from everyone here.\n\nMy name is Eddie and I'm 33 years old. I immigrated to New Zealand from Taiwan when I was 11 without speaking any English (except how are you). A lot of my childhood consisted of looking up words in the dictionary in order to do homework, but I am glad to have had that experience. After a bit of struggle, I finally graduated from high school and university and now I'm a permanent high school maths teacher, and my English is now the least of my worries. I currently live in my own house on an acreage in Brisbane Australia, and I wouldn't live anywhere else. I still speak fluent Chinese and a while ago, I went on the world's most viewed dating show \"If You Are The One\" in China as an Australian contestant, you can watch my appearance here:\n\nhttps://www.youtube.com/watch?v=OtTAPhJZ5JE\n\n### My interests and hobbies\n\n![My picture](https://scontent-syd1-1.xx.fbcdn.net/v/t1.0-9/12509060_977260735681940_6691008880673566787_n.jpg?oh=9ae2ac2e72e5f28e50de30857ac88b13&oe=57EB824F)\n\nOther than studying hard at mathematics and computers, I'm passionate about exercise. I have won two Brisbane Night Tennis Association competitions. I have competed in swing dance championships around Australia, and I regularly practice Tai Chi, Shaolin and Praying Mantis Kung Fu. I believe exercising improves health and having good health is important to living a good life.\n\n![My picture](https://scontent-syd1-1.xx.fbcdn.net/v/t1.0-9/1394472_553116498096368_370916207_n.jpg?oh=16881a36fb5ae8938a179ad91f197fc7&oe=58151298)\n\n### My history with Youtube\n\nA few years ago I saw Khan Academy on Youtube. He was a great teacher, however, we have a different maths curriculum here in Australia, so I decided to start my own math teaching on Youtube for Australian students. I have 3.5 million views now, and funnily enough most of my viewers are actually from overseas. I still work as a high school teacher full time so I don't have much time for Youtube, but I make videos when I can :) \n\nMy students were so impressed with my Youtube channel that one of my best students made this video about me. \n\nhttps://www.youtube.com/watch?v=wZskm-oETMY\n\nMy goal is to demystify maths and other difficult subjects such as computer programming and make them accessible to everyone. I use basic terms and I explain slowly so anyone can understand. I'm not very smart myself so if I can learn these things then anyone can. My lessons are structured so if you watch my videos from beginning to end on the playlist, you can learn everything from basic algebra to Calculus. \n\nhttps://www.youtube.com/watch?v=rBf1eYwwQFE\n\nI believe Steem will benefit from my participation as I will link my articles to my website http://magicmonk.org and my Youtube channel so they will bring more users to Steem.\n\n**Please feel free to share your ideas, advice, feedback with me. I look forward to hearing from you all!!**",
"cashout_time": "1969-12-31T23:59:59",
"category": "introduceyourself",
"children": 60,
"children_abs_rshares": 0,
"created": "2016-07-24T04:52:48",
"curator_payout_value": {
"amount": "248842",
"nai": "@@000000013",
"precision": 3
},
"depth": 0,
"id": 227413,
"json_metadata": "{\"tags\":[\"introduceyourself\"],\"links\":[\"https://www.youtube.com/watch?v=OtTAPhJZ5JE\"]}",
"last_payout": "2016-08-24T06:35:09",
"last_update": "2016-07-24T09:39:24",
"max_accepted_payout": {
"amount": "1000000000",
"nai": "@@000000013",
"precision": 3
},
"max_cashout_time": "1969-12-31T23:59:59",
"net_rshares": 0,
"net_votes": 265,
"parent_author": "",
"parent_permlink": "introduceyourself",
"percent_steem_dollars": 10000,
"permlink": "hello-steemit-my-name-s-eddie-a-k-a-the-magic-monk-i-am-a-youtuber-and-a-high-school-teacher-let-the-writing-begin",
"reward_weight": 10000,
"root_author": "magicmonk",
"root_permlink": "hello-steemit-my-name-s-eddie-a-k-a-the-magic-monk-i-am-a-youtuber-and-a-high-school-teacher-let-the-writing-begin",
"title": "Hello Steemit! My name's Eddie (a.k.a. the Magic Monk), I am a Youtuber and a high school teacher! Let the writing begin!",
"total_payout_value": {
"amount": "3020002",
"nai": "@@000000013",
"precision": 3
},
"total_vote_weight": 0,
"vote_rshares": 0
}
]
}
{
"code": -32602,
"data": "got an unexpected keyword argument 'limit'",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.find_comments unknown extra arguments
marks:
- patterntest # fat node didn't care about extra arguments so it gave response like in database_api_patterns/find_comments/all_data.tavern.yaml
- negative
includes:
- !include ../../common.yaml
stages:
- name: database_api.find_comments unknown extra arguments
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_comments"
params:
{
"comments": [["magicmonk","hello-steemit-my-name-s-eddie-a-k-a-the-magic-monk-i-am-a-youtuber-and-a-high-school-teacher-let-the-writing-begin"]],
"limit": 0,
"order": "",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "too_much_data"
directory: "database_api_negative/find_comments"
error_response: true
{
"code": -32602,
"data": "permlink cannot be blank",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.find_votes cdomment not found 2
test_name: Hivemind database_api.find_votes only author
marks:
- patterntest
......@@ -9,7 +9,7 @@ includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found 2
- name: database_api.find_votes only author
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -22,14 +22,13 @@ stages:
params:
{
"author": "kental",
"permlink": "",
"permlink": ""
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found2"
method: "author"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32602,
"data": "Post hiveio/firstpost does not exist",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.find_votes cdomment not found hiveio firstpost
test_name: Hivemind database_api.find_votes bad data
marks:
- patterntest
......@@ -9,7 +9,7 @@ includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found hiveio firstpost
- name: database_api.find_votes bad data
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -22,14 +22,13 @@ stages:
params:
{
"author": "hiveio",
"permlink": "firstpost",
"permlink": "firstpost"
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found_hiveio_firstpost"
method: "bad_data"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32602,
"data": "invalid account (not specified)",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.find_votes cdomment not found
test_name: Hivemind database_api.find_votes no data
marks:
- patterntest
......@@ -18,13 +18,12 @@ marks:
# }
# ]
# }
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found
- name: database_api.find_votes no data
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -44,7 +43,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found"
method: "no_data"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32602,
"data": "invalid account (not specified)",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.find_votes cdomment not found by permlink
test_name: Hivemind database_api.find_votes only permlink
marks:
- patterntest
......@@ -9,7 +9,7 @@ includes:
- !include ../../common.yaml
stages:
- name: database_api.find_votes cdomment not found by permlink
- name: database_api.find_votes only permlink
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -29,7 +29,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found_by_permlink"
method: "permlink"
directory: "database_api_negative/find_votes"
error_response: true
ignore_tags: ["timestamp"]
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1134,
"method": "list_comments"
"method": "list_comments",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"a": "givemeyoursteem",
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1134,
"method": "list_comments"
"method": "list_comments",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"a": "givemeyoursteem",
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
"method": "from_iso_string",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"what": "Day of month value is out of range 1..31"
......
{
"code": -32602,
"data": "Date is blank",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range
test_name: Hivemind database_api.list_comments test order "by_cashout_time" no date
marks:
- patterntest
- negative
- failing
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_comments day of the month out of range
- name: list_comments no date
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -28,7 +26,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_of_the_month_out_of_range"
method: "by_cashout_time_no_date"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
\ No newline at end of file
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
"method": "from_iso_string",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"what": "basic_string::at: __n (which is 0) >= this->size() (which is 0)"
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
"method": "from_iso_string",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"what": "Day of month value is out of range 1..31"
......
{
"code": -32602,
"data": "Date is blank",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range "by_last_update"
test_name: Hivemind database_api.list_comments test order "by_last_update" no date
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"
- name: list_comments no date
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -28,7 +26,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_out_of_range_empty"
method: "by_last_update_no_date"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
"method": "from_iso_string",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"what": "Day of month value is out of range 1..31"
......
{
"code": -32602,
"data": "invalid account name length: `2016-08-24T21:29:42`",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range start 0
test_name: Hivemind database_api.list_comments "by_last_update" wrong author
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
- name: list_comments wrong author
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -32,7 +30,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_out_of_range_start_0"
method: "by_last_update_wrong_author"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
"method": "from_iso_string",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"what": "basic_string::at: __n (which is 0) >= this->size() (which is 0)"
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "warn",
"line": 48,
"method": "from_iso_string"
"method": "from_iso_string",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"what": "Day of month value is out of range 1..31"
......
{
"code": -32602,
"data": "Date should be in format Y-m-d H:M:S or Y-m-dTH:M:S",
"message": "Invalid parameters"
}
---
test_name: Hivemind database_api.list_comments day of the month out of range start 3
test_name: Hivemind database_api.list_comments "by_last_update" day out of range
marks:
- patterntest # first arg is author, not date (error about date)
- patterntest
- negative
- failing
- xfail
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_comments day of the month out of range start 3
- name: list_comments day out of range
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
......@@ -32,7 +30,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "day_out_of_range_start_3"
method: "by_last_update_wrong_day"
directory: "database_api_negative/list_comments"
error_response: true
ignore_tags: ["timestamp"]
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1085,
"method": "list_comments"
"method": "list_comments",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"a": "givemeyoursteem",
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1061,
"method": "list_comments"
"method": "list_comments",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"a": "vi1son",
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1061,
"method": "list_comments"
"method": "list_comments",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"a": "vi1son",
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1050,
"method": "list_comments"
"method": "list_comments",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"a": "vi1son",
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1050,
"method": "list_comments"
"method": "list_comments",
"timestamp": "2020-09-10T17:10:39"
},
"data": {
"a": "giv",
......
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1215,
"method": "votes_impl"
"method": "votes_impl",
"timestamp": "2020-09-10T17:35:29"
},
"data": {
"a": "roelandp",
......
{
"code": -32602,
"data": "Post roelandp/ does not exist",
"message": "Invalid parameters"
}
......@@ -30,7 +30,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "comment_not_found"
method: "by_comment_voter_author"
directory: "database_api_negative/list_votes"
error_response: true
ignore_tags: ["timestamp"]
......@@ -11,7 +11,8 @@
"hostname": "",
"level": "error",
"line": 1215,
"method": "votes_impl"
"method": "votes_impl",
"timestamp": "2020-09-10T17:35:29"
},
"data": {
"a": "",
......
{
"code": -32602,
"data": "Post /re-roelandp-tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours-20160825t212252221z does not exist",
"message": "Invalid parameters"
}
......@@ -30,7 +30,6 @@ stages:
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "permlink_not_found"
method: "by_comment_voter_permlink"
directory: "database_api_negative/list_votes"
error_response: true
ignore_tags: ["timestamp"]
{
"code": -32003,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [