Commit 4f3bf7bd authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'mt-get-accounts' into 'master'

The call `get_accounts` is removed from hivemind

See merge request !64
parents f59e9c79 b65415fa
......@@ -9,7 +9,6 @@
- get_account_references
- get_account_reputations
- get_account_votes
- get_accounts
- get_active_votes
- get_active_witnesses
- get_block
......@@ -233,16 +232,6 @@ Windows call:
Results:
`"ApiError: get_account_votes is no longer supported, for details see https://steemit.com/steemit/@steemitdev/additional-public-api-change"
#### get_accounts
Linux call:
`python3 get_accounts.py https://api.steem.house https://api.steemit.com ./ steemit alice steempeak
Windows call:
`python get_accounts.py https://api.steemit.com https://api.steem.house ./ steemit alice steempeak
Results:
Works fine.
#### get_active_votes
Linux call:
`python3 get_active_votes.py https://api.steem.house https://api.steemit.com ./ drakos open-letter-to-justin-sun-and-the-steem-community
......
#!/usr/bin/python3
import os
import sys
sys.path.append(os.path.dirname(__file__) + "/../../../")
import json
from testbase import SimpleJsonTest
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("test_node", type = str, help = "IP address of test node")
parser.add_argument("ref_node", type = str, help = "IP address of reference node")
parser.add_argument("work_dir", type = str, help = "Work dir")
parser.add_argument("account", type = str, nargs='+', help = "Account name")
args = parser.parse_args()
tester = SimpleJsonTest(args.test_node, args.ref_node, args.work_dir)
print("Test node: {}".format(args.test_node))
print("Ref node: {}".format(args.ref_node))
print("Work dir: {}".format(args.work_dir))
print("account: {}".format(args.account))
test_args = {
"jsonrpc": "2.0",
"id": 1,
"method": "condenser_api.get_accounts",
"params": [
args.account
]
}
if tester.compare_results(test_args, True):
exit(0)
exit(1)
......@@ -21,10 +21,6 @@ tests = [
"method": "condenser_api.get_trending_tags",
"params": ["", 20]
},
{
"method": "condenser_api.get_accounts",
"params": [["initminer","temp"]]
},
{
"method": "condenser_api.get_active_votes",
"params": ["temp", "test1"]
......
......@@ -175,14 +175,6 @@
- args: '{"author":"steemit","permlink":"firstpost"}'
- <<: *base_test
# Method not found
# - test:
# - name: "get_accounts"
# - variable_binds:
# - method: "get_accounts"
# - args: '[["steemit"]]'
# - <<: *base_test
# No longer supported
# - test:
# - name: "get_account_votes"
......
......@@ -177,14 +177,6 @@
- args: '{"author":"steemit","permlink":"firstpost"}'
- <<: *base_test
# Method not found
# - test:
# - name: "get_accounts"
# - variable_binds:
# - method: "get_accounts"
# - args: '[["steemit"]]'
# - <<: *base_test
# No longer supported
# - test:
# - name: "get_account_votes"
......
......@@ -177,13 +177,6 @@
- args: '{"author":"steemit","permlink":"firstpost"}'
- <<: *base_benchmark
- benchmark:
- name: "get_accounts"
- variable_binds:
- method: "get_accounts"
- args: '[["steemit"]]'
- <<: *base_benchmark
# No longer supported
# - benchmark:
# - name: "get_account_votes"
......
......@@ -189,13 +189,6 @@
- args: '{"author":"steemit","permlink":"firstpost"}'
- <<: *base_test
- test:
- name: "get_accounts"
- variable_binds:
- method: "get_accounts"
- args: '[["steemit"]]'
- <<: *base_test
# No longer supported
# - test:
# - name: "get_account_votes"
......
......@@ -1724,95 +1724,3 @@
method: "get_account_votes_deprecated"
directory: "condenser_api_patterns"
error_response: true
---
# get_accounts should be based on fat node - posting_rewards and reputations are 0 on AH node
test_name: Hivemind condenser_api.get_accounts with single account patterns test
marks:
- patterntest
- failing
- xfail # results are so different that it looks like wrong routine is called (possible link to raw_json that is now empty)
includes:
- !include common.yaml
stages:
- name: get_accounts
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_accounts"
params: [["steemit"]]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "get_accounts"
directory: "condenser_api_patterns"
---
test_name: Hivemind condenser_api.get_accounts with multiple accounts patterns test
marks:
- patterntest
- failing
- xfail # results are so different that it looks like wrong routine is called (possible link to raw_json that is now empty)
includes:
- !include common.yaml
stages:
- name: get_accounts with multiple accounts
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_accounts"
params: [["steemit","biophil","test"]]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "get_multiple_accounts"
directory: "condenser_api_patterns"
---
test_name: Hivemind condenser_api.get_accounts with non existing account patterns test
marks:
- patterntest
includes:
- !include common.yaml
stages:
- name: get_accounts with non existing account
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_accounts"
params: [["nalesnik"]]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "get_non_existing_accounts"
directory: "condenser_api_patterns"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment