Commit 7d925b4e authored by Andrzej Lisak's avatar Andrzej Lisak

[ABW]: 5 tests marked as passing due to fix in escaping

some passing tests from database_api separated to their own .yaml files according to new scheme
parent e8e381d9
---
test_name: Hivemind database_api.list_comments patterns test order "by_cashout_time" all data
marks:
- patterntest # passing only because parameters were changed so results only cover specific posts
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_cashout_time
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":
[
"1969-12-31T23:59:59",
"proskynneo",
"steemit-firstpost-1",
],
"limit": 10,
"order": "by_cashout_time",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_cashout_time_all_data"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_cashout_time" data exist in database
marks:
- patterntest # incomparable with original due to cashout_time differences
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_cashout_time
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": ["1970-01-01T00:00:00", "", ""],
"limit": 10,
"order": "by_cashout_time",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_cashout_time_first_date"
directory: "database_api_patterns/list_comments"
\ No newline at end of file
---
test_name: Hivemind database_api.list_comments patterns test order "by_cashout_time" future date
marks:
- patterntest # show first posts comments
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_cashout_time
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": ["2030-07-08T00:45:15", "", ""],
"limit": 10,
"order": "by_cashout_time",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_cashout_time_future_date"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_cashout_time" data exist in database
marks:
- patterntest # incomparable with original due to cashout_time differences (same pattern as in by_cashout_time_first_date)
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_cashout_time
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-07-08T00:45:15", "", ""],
"limit": 10,
"order": "by_cashout_time",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_cashout_time_second"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_permlink"
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: list_comments
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":["steemit","firstpost"], "limit":10, "order":"by_permlink"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_permlink"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_permlink" good permlink
marks:
- patterntest # author first - when empty, takes alphabetical (later by permlink)
includes:
- !include ../../common.yaml
stages:
- name: list_comments_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.list_comments"
params:
{
"start":
[
"",
"re-an-introduction-to-where-eagles-fly-the-american-wilderness-expedition-by-zedekiah-morse-20160824t212916",
],
"limit": 10,
"order": "by_permlink",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_permlink_good_permlink"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_permlink" no data
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: list_comments_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.list_comments"
params: { "start": ["", ""], "limit": 10, "order": "by_permlink" }
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_permlink_no_data"
directory: "database_api_patterns/list_comments"
\ No newline at end of file
---
test_name: Hivemind database_api.list_comments patterns test order "by_root" good params
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_root
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": ["gtg", "hello-world", "", ""],
"limit": 10,
"order": "by_root",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_root"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_root" all values correct
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_root
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": ["givemeyoursteem", "winners-of-steemit-food-challenge-3-desserts-to-die-for", "vi1son", "re-givemeyoursteem-winners-of-steemit-food-challenge-3-desserts-to-die-for-20160828t172955785z"],
"limit": 10,
"order": "by_root",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_root_all_values"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_root" required values (comment of a post)
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_root
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": ["vi1son", "re-givemeyoursteem-winners-of-steemit-food-challenge-3-desserts-to-die-for-20160828t172955785z", "", ""],
"limit": 10,
"order": "by_root",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_root_comment"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_root" no data
marks:
- patterntest # first two params are required
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_root
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_root",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_root_no_data"
directory: "database_api_patterns/list_comments"
---
test_name: Hivemind database_api.list_comments patterns test order "by_root" required values (post)
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: list_comments_by_root
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": ["givemeyoursteem", "winners-of-steemit-food-challenge-3-desserts-to-die-for", "", ""],
"limit": 10,
"order": "by_root",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "by_root_post"
directory: "database_api_patterns/list_comments"
......@@ -3,8 +3,6 @@
marks:
- patterntest
- failing
- xfail # escaping (it is really wrong, influences size as well and wrong size suggests what was expected, that is, the skipped escaping is interpreted as no escape)
includes:
- !include ../../common.yaml
......
---
test_name: Hivemind database_api.list_comments patterns test order "by_permlink"
marks:
- patterntest
- failing
- xfail # escaping
includes:
- !include common.yaml
stages:
- name: list_comments
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":["steemit","firstpost"], "limit":10, "order":"by_permlink"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "list_comments"
directory: "database_api_patterns"
---
test_name: Hivemind database_api.find_comments patterns test
......@@ -176,78 +145,6 @@ stages:
directory: "database_api_patterns"
error_response: true
ignore_tags: ["timestamp"]
---
test_name: Hivemind database_api.list_comments patterns test order "by_cashout_time" all data
marks:
- patterntest # passing only because parameters were changed so results only cover specific posts
includes:
- !include common.yaml
stages:
- name: list_comments_by_cashout_time
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":
[
"1969-12-31T23:59:59",
"proskynneo",
"steemit-firstpost-1",
],
"limit": 10,
"order": "by_cashout_time",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "list_comments_by_cashout_time_all_data"
directory: "database_api_patterns"
---
test_name: Hivemind database_api.list_comments patterns test order "by_cashout_time" future data
marks:
- patterntest # show first posts comments
includes:
- !include common.yaml
stages:
- name: list_comments_by_cashout_time
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": ["2030-07-08T00:45:15", "", ""],
"limit": 10,
"order": "