Skip to content
Snippets Groups Projects
Commit fafe1ae7 authored by Andrzej Lisak's avatar Andrzej Lisak
Browse files

[ABW]: update in CI - tags_api has negative group, while old .yaml is no longer present

changed behaviour of some condenser_api calls: when start_author or start_permlink is present, they need to point to correct post or error is generated
fixed crash when start_author or start_permlink is passed to some condenser_api calls
parent 763dbde8
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!138Small typos fixed,!126update in CI - tags_api has negative group, while old .yaml is no longer present
......@@ -284,23 +284,23 @@ follow_api_smoketest:
reports:
junit: api_smoketest_follow_api.xml
tags_api_smoketest_old:
tags_api_smoketest:
<<: *common_api_smoketest_job
script:
- scripts/ci_start_api_smoketest.sh localhost "$HIVEMIND_HTTP_PORT" test_tags_api_patterns.tavern.yaml api_smoketest_tags_api_old.xml
- scripts/ci_start_api_smoketest.sh localhost "$HIVEMIND_HTTP_PORT" tags_api_patterns/ api_smoketest_tags_api.xml
artifacts:
reports:
junit: api_smoketest_tags_api_old.xml
junit: api_smoketest_tags_api.xml
tags_api_smoketest:
tags_api_smoketest_negative:
<<: *common_api_smoketest_job
script:
- scripts/ci_start_api_smoketest.sh localhost "$HIVEMIND_HTTP_PORT" tags_api_patterns/ api_smoketest_tags_api.xml
- scripts/ci_start_api_smoketest.sh localhost "$HIVEMIND_HTTP_PORT" tags_api_negative/ api_smoketest_tags_api_negative.xml
artifacts:
reports:
junit: api_smoketest_tags_api.xml
junit: api_smoketest_tags_api_negative.xml
......@@ -21,7 +21,7 @@ async def get_post_id(db, author, permlink):
INNER JOIN hive_accounts ha_a ON ha_a.id = hp.author_id
INNER JOIN hive_permlink_data hpd_p ON hpd_p.id = hp.permlink_id
WHERE ha_a.name = :author AND hpd_p.permlink = :permlink
AND counter_deleted = 0 LIMIT 1""" # ABW: replace with find_comment_id(:author,:permlink)?
AND counter_deleted = 0 LIMIT 1""" # ABW: replace with find_comment_id(:author,:permlink,True)?
return await db.query_one(sql, author=author, permlink=permlink)
async def get_child_ids(db, post_id):
......@@ -190,8 +190,8 @@ async def pids_by_query(db, sort, start_author, start_permlink, limit, tag):
where.append(sql)
start_id = None
if start_permlink and start_author:
sql = "%s <= (SELECT %s FROM %s WHERE id = find_comment_id('{}', '{}'))".format(start_author, start_permlink)
if start_permlink or start_author:
sql = "%s <= (SELECT %s FROM %s WHERE id = find_comment_id('{}', '{}', True))".format(start_author, start_permlink)
where.append(sql % (field, raw_field, table))
sql = """
......
Subproject commit 9f6058b31adec6378ead1b15ae6c1e7bb75823f7
Subproject commit 43f46f320af704f4ac173005696ab8526e8d08f2
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