Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] Backport: Add trace plugin API test #584

Merged
merged 2 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/trx_finality_status_forked_test.py ${
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plugin_http_api_test.py ${CMAKE_CURRENT_BINARY_DIR}/plugin_http_api_test.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_contrl_c_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_contrl_c_test.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resource_monitor_plugin_test.py ${CMAKE_CURRENT_BINARY_DIR}/resource_monitor_plugin_test.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/trace_plugin_test.py ${CMAKE_CURRENT_BINARY_DIR}/trace_plugin_test.py COPYONLY)

#To run plugin_test with all log from blockchain displayed, put --verbose after --, i.e. plugin_test -- --verbose
add_test(NAME plugin_test COMMAND plugin_test --report_level=detailed --color_output)
Expand Down Expand Up @@ -220,6 +221,10 @@ add_test(NAME plugin_http_api_test COMMAND tests/plugin_http_api_test.py WORKING
set_tests_properties(plugin_http_api_test PROPERTIES TIMEOUT 40)
set_property(TEST plugin_http_api_test PROPERTY LABELS nonparallelizable_tests)

add_test(NAME trace_plugin_test COMMAND tests/trace_plugin_test.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_tests_properties(trace_plugin_test PROPERTIES TIMEOUT 100)
set_property(TEST trace_plugin_test PROPERTY LABELS nonparallelizable_tests)

add_test(NAME resource_monitor_plugin_test COMMAND tests/resource_monitor_plugin_test.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST resource_monitor_plugin_test PROPERTY LABELS long_running_tests)

Expand Down
2 changes: 1 addition & 1 deletion tests/Node.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def getTransBlockNum(trans):
cntxt.add("processed")
cntxt.add("action_traces")
cntxt.index(0)
if cntxt.hasKey("except"):
if not cntxt.isSectionNull("except"):
return "no_block"
return cntxt.add("block_num")

Expand Down
Empty file modified tests/trace_plugin_test.py
100644 → 100755
Empty file.