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 590 additions and 0 deletions
{
"votes": [
{
"id": 603086,
"voter": "curator",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 95219365,
"vote_percent": 10000,
"last_update": "2016-07-19T04:40:30",
"num_changes": -1
},
{
"id": 1614263,
"voter": "dubovoy",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 232295871,
"vote_percent": 10000,
"last_update": "2016-07-31T19:55:21",
"num_changes": 0
},
{
"id": 4098784,
"voter": "solos",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 0,
"vote_percent": 10000,
"last_update": "2016-09-09T15:34:36",
"num_changes": 0
},
{
"id": 650424,
"voter": "creatorgalaxy",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 96945805,
"vote_percent": 10000,
"last_update": "2016-07-19T20:29:33",
"num_changes": -1
},
{
"id": 776832,
"voter": "trigonice29",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 99813231,
"vote_percent": 10000,
"last_update": "2016-07-21T12:24:27",
"num_changes": -1
},
{
"id": 3479202,
"voter": "blysards",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 0,
"vote_percent": 10000,
"last_update": "2016-08-28T16:49:57",
"num_changes": 0
},
{
"id": 2783362,
"voter": "uwe69",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 3721016208,
"vote_percent": 10000,
"last_update": "2016-08-16T10:07:39",
"num_changes": 0
},
{
"id": 911514,
"voter": "nigmat",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": 1279854,
"vote_percent": 10000,
"last_update": "2016-07-23T13:32:36",
"num_changes": -1
},
{
"id": 2217163,
"voter": "magicmonk",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": "13974353753",
"vote_percent": 10000,
"last_update": "2016-08-07T05:23:48",
"num_changes": 0
},
{
"id": 2633913,
"voter": "satoshifpv",
"author": "steemit",
"permlink": "firstpost",
"weight": 0,
"rshares": "4968585456",
"vote_percent": 10000,
"last_update": "2016-08-13T15:16:36",
"num_changes": 0
}
]
}
\ No newline at end of file
---
test_name: Hivemind database_api.list_votes patterns test order "by_comment_voter" only voter
marks:
- patterntest
- xfail # wrong output, shows first post votes
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_votes patterns test order "by_comment_voter" only voter
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": ["", "", "winstonwolfe"],
"limit": 10,
"order": "by_comment_voter",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_comment_voter_only_voter"
directory: "database_api_patterns/list_votes"
{
"votes": [
{
"id": 54513,
"voter": "nxt2",
"author": "satoshi",
"permlink": "bulk-generate-privkeys",
"weight": 287703877,
"rshares": "4800000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:52:00",
"num_changes": -1
},
{
"id": 54508,
"voter": "nxt2",
"author": "au1nethyb1",
"permlink": "reducing-friction-for-critical-mass-adoption-of-steemit",
"weight": 4,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:27",
"num_changes": -1
},
{
"id": 54511,
"voter": "nxt2",
"author": "blocktrades",
"permlink": "-blocktrades-adds-support-for-directly-buyingselling-steem",
"weight": 1,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:48",
"num_changes": -1
},
{
"id": 54512,
"voter": "nxt2",
"author": "nextgencrypto",
"permlink": "request-for-proposal-steem-wordpress-plugin",
"weight": 2,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:51:15",
"num_changes": -1
},
{
"id": 54509,
"voter": "nxt2",
"author": "dan",
"permlink": "is-the-dao-going-to-be-doa",
"weight": 3,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:36",
"num_changes": -1
},
{
"id": 54507,
"voter": "nxt2",
"author": "judyhopps",
"permlink": "hi-i-googled-something-and-ended-up-here",
"weight": 17,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:03",
"num_changes": -1
},
{
"id": 54504,
"voter": "nxt2",
"author": "clains",
"permlink": "hello-world-my-name-is-clains",
"weight": 9,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:18",
"num_changes": -1
},
{
"id": 54505,
"voter": "nxt2",
"author": "smooth",
"permlink": "voting-is-a-popularity-contest",
"weight": 12,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:27",
"num_changes": -1
},
{
"id": 54506,
"voter": "nxt2",
"author": "bleepcoin",
"permlink": "hi-im-ollie",
"weight": 71,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:30",
"num_changes": -1
},
{
"id": 54502,
"voter": "nxt2",
"author": "donkeypong",
"permlink": "my-name-is-ziggy-aka-donkeypongs-companion",
"weight": 61,
"rshares": "5100000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:12",
"num_changes": -1
}
]
}
\ No newline at end of file
---
test_name: Hivemind database_api.list_votes patterns test order "by_voter_comment" author + permlink
marks:
- patterntest
- xfail # show "voter": "nxt2" votes, not connected with author and permlink (like no data)
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_votes patterns test order "by_comment_voter" author + 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.list_votes"
params:
{
"start": ["", "roelandp", "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours"],
"limit": 10,
"order": "by_voter_comment",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_voter_comment_author_permlink"
directory: "database_api_patterns/list_votes"
{
"votes": [
{
"id": 54513,
"voter": "nxt2",
"author": "satoshi",
"permlink": "bulk-generate-privkeys",
"weight": 287703877,
"rshares": "4800000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:52:00",
"num_changes": -1
},
{
"id": 54508,
"voter": "nxt2",
"author": "au1nethyb1",
"permlink": "reducing-friction-for-critical-mass-adoption-of-steemit",
"weight": 4,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:27",
"num_changes": -1
},
{
"id": 54511,
"voter": "nxt2",
"author": "blocktrades",
"permlink": "-blocktrades-adds-support-for-directly-buyingselling-steem",
"weight": 1,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:48",
"num_changes": -1
},
{
"id": 54512,
"voter": "nxt2",
"author": "nextgencrypto",
"permlink": "request-for-proposal-steem-wordpress-plugin",
"weight": 2,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:51:15",
"num_changes": -1
},
{
"id": 54509,
"voter": "nxt2",
"author": "dan",
"permlink": "is-the-dao-going-to-be-doa",
"weight": 3,
"rshares": "4900000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:36",
"num_changes": -1
},
{
"id": 54507,
"voter": "nxt2",
"author": "judyhopps",
"permlink": "hi-i-googled-something-and-ended-up-here",
"weight": 17,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:50:03",
"num_changes": -1
},
{
"id": 54504,
"voter": "nxt2",
"author": "clains",
"permlink": "hello-world-my-name-is-clains",
"weight": 9,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:18",
"num_changes": -1
},
{
"id": 54505,
"voter": "nxt2",
"author": "smooth",
"permlink": "voting-is-a-popularity-contest",
"weight": 12,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:27",
"num_changes": -1
},
{
"id": 54506,
"voter": "nxt2",
"author": "bleepcoin",
"permlink": "hi-im-ollie",
"weight": 71,
"rshares": "5000000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:30",
"num_changes": -1
},
{
"id": 54502,
"voter": "nxt2",
"author": "donkeypong",
"permlink": "my-name-is-ziggy-aka-donkeypongs-companion",
"weight": 61,
"rshares": "5100000000",
"vote_percent": 10000,
"last_update": "2016-06-05T06:48:12",
"num_changes": -1
}
]
}
\ No newline at end of file
---
test_name: Hivemind database_api.list_votes patterns test order "by_voter_comment" no data
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_votes patterns test order "by_voter_comment" no data
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": ["", "", ""],
"limit": 10,
"order": "by_voter_comment",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_voter_comment_no_data"
directory: "database_api_patterns/list_votes"
{
"votes": [
{
"id": 4468,
"voter": "bunny",
"author": "wackou",
"permlink": "wackou-witness-post",
"weight": 27,
"rshares": 3782373700,
"vote_percent": 10000,
"last_update": "2016-05-04T05:20:06",
"num_changes": -1
},
{
"id": 107,
"voter": "bunny",
"author": "bue-witness",
"permlink": "bue-witness-post",
"weight": 5,
"rshares": 206,
"vote_percent": 10000,
"last_update": "2016-04-10T15:31:15",
"num_changes": -1
},
{
"id": 193,
"voter": "bunny",
"author": "boy",
"permlink": "news",
"weight": 41823962,
"rshares": 3936,
"vote_percent": 10000,
"last_update": "2016-04-13T18:12:15",
"num_changes": -1
},
{
"id": 169,
"voter": "bunny",
"author": "bue",
"permlink": "news",
"weight": 13204514,
"rshares": 3936,
"vote_percent": 10000,
"last_update": "2016-04-13T12:09:39",
"num_changes": -1
},
{
"id": 4460,
"voter": "bunny",
"author": "pop",
"permlink": "china",
"weight": 94422,
"rshares": 3859565000,
"vote_percent": 10000,
"last_update": "2016-05-04T05:16:42",
"num_changes": -1
},
{
"id": 4459,
"voter": "bunny",
"author": "pop",
"permlink": "taiwanese",
"weight": 79128,
"rshares": 3936756300,
"vote_percent": 10000,
"last_update": "2016-05-04T05:16:39",
"num_changes": -1
},
{
"id": 4462,
"voter": "bunny",
"author": "ice",
"permlink": "taiwan",
"weight": 44360,
"rshares": 3859565000,
"vote_percent": 10000,
"last_update": "2016-05-04T05:16:48",
"num_changes": -1
},
{
"id": 11966,
"voter": "bunny",
"author": "pharesim",
"permlink": "witness-post",
"weight": 3,
"rshares": 3627991100,
"vote_percent": 10000,
"last_update": "2016-08-27T00:39:00",
"num_changes": -1
},
{
"id": 4495,
"voter": "bunny",
"author": "silver",
"permlink": "panama-papers",
"weight": 6663372,
"rshares": 3319225900,
"vote_percent": 10000,
"last_update": "2016-05-04T05:21:57",
"num_changes": -1
},
{
"id": 4480,
"voter": "bunny",
"author": "dele-puppy",
"permlink": "dele-puppy-witness-thread",
"weight": 2464,
"rshares": 3550799800,
"vote_percent": 10000,
"last_update": "2016-05-04T05:20:54",
"num_changes": -1
}
]
}
\ No newline at end of file
---
test_name: Hivemind database_api.list_votes patterns test order "by_voter_comment" voter
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: database_api.list_votes patterns test order "by_voter_comment" voter
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": ["bunny", "", ""],
"limit": 10,
"order": "by_voter_comment",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_voter_comment_voter"
directory: "database_api_patterns/list_votes"
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