Skip to content
Snippets Groups Projects
Commit 8e497f9c authored by Marcin's avatar Marcin
Browse files

smoketest api works

Some test cases are removed, they don't work both on public nodes and
our internals.
parent 111bf64b
No related branches found
No related tags found
1 merge request!1import tests from hive/hive repo and make some more sense structure for them
......@@ -21,4 +21,10 @@ macro(ADD_API_TEST common_working_dir directory_with_test product api_name test_
endif()
add_test(NAME "api/${api_name}/${test_name}" COMMAND python3 ${test_parameters} WORKING_DIRECTORY ${working_dir})
set_property(TEST "api/${api_name}/${test_name}" PROPERTY LABELS python_tests ${api_name} ${test_name})
endmacro(ADD_API_TEST)
\ No newline at end of file
endmacro(ADD_API_TEST)
# @directory_with_test - full path to tests_api repo on the disk
# @product - hived or hivemind
macro(ADD_API_SMOKETEST directory_with_test product)
ADD_TEST(NAME "api/smoketes" COMMAND ${directory_with_test}/${product}/api_error_smoketest.py ${TEST_NODE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
endmacro(ADD_API_SMOKETEST)
\ No newline at end of file
Contains tests for API. All API tests are currently grouped for these served by hived
and these served by hivemind. The goal is to have flat list of the tests and start
their subsets separatly by hived and hivemind CI processes.
\ No newline at end of file
......@@ -394,10 +394,6 @@ tests = [
"method": "database_api.find_decline_voting_rights_requests",
"params": {"accounts":["temp","null"]}
},
{
"method": "database_api.list_limit_orders",
"params": {"start":[{"base":{"amount":1000,"precision":3,"nai":"@@000000021"},"quote":{"amount":1,"precision":3,"nai":"@@000000013"}},0], "limit":10, "order":"by_price"}
},
{
"method": "database_api.find_limit_orders",
"params": {"account":"temp"}
......@@ -421,22 +417,6 @@ tests = [
{
"method": "database_api.verify_signatures",
"params": {"required_active":["temp"]}
},
{
"method": "database_api.list_smt_token_emissions",
"params": {"limit": 100, "order": "by_symbol_time", "start": []}
},
{
"method": "database_api.find_smt_token_emissions",
"params": {"asset_symbol": {"nai":"@@100000006", "decimals": 3}}
},
{
"method": "database_api.list_smt_contributions",
"params": {"limit": 100, "order": "by_symbol_contributor", "start": []}
},
{
"method": "database_api.find_smt_contributions",
"params": {"symbol_contributor": [{"asset_symbol": {"nai":"@@100000006", "decimals": 3}, "account": "temp"}] }
}
]
......@@ -463,7 +443,7 @@ def test_api( url, headers, payload ):
def main():
if len( sys.argv ) == 1:
url = "https://api.steemit.com/"
url = "https://api.hive.blog/"
elif len( sys.argv ) == 2:
url = sys.argv[1]
else:
......@@ -499,4 +479,4 @@ def main():
return 0
if __name__ == "__main__":
main()
exit( main() )
#!/bin/bash
NODE='http://127.0.0.1'
RPC_PORT=8090
NODE='http://192.168.4.117'
RPC_PORT=8091
EXIT_CODE=0
COMPARATOR=''
if [ $1 == 'equal' ]
if [ "$1" = "equal" ]
then
COMPARATOR='comparator_equal'
elif [ $1 == 'contain' ]
elif [ "$1" = "contain" ]
then
COMPARATOR='comparator_contain'
else
......
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